Question: Random game creator in Python? Instructions : Imagine the player is exploring a location, whether it's an old castle or a hidden cave. As they

Random game creator in Python?

Instructions:

  • Imagine the player is exploring a location, whether it's an old castle or a hidden cave. As they explore different spots within the location, they may find treasure (gain points) or encounter some hazard (lose points)

  • Complete the list of locations with text strings that represent different spots in the location the player is exploring

  • Assume the player starts at 0 points. Decide what will be a winning score. The player will move through the location until they gain enough points to reach the winning score.

  • Each turn through the while loop, print the value of a random choice from the locations list.

  • Get a random integer for points from this room. Allow the possibility to get a negative value. So for example, between -3 and 10 as possible random integers.

  • Add (or subtract) that random number to the player score.

  • Once the player has won, print a winning message and their final score.

  • There is no need for user input in this game. The computer is making random choices for the player.

I have no idea how to start a script according to the instructions. If possible, can you add a picture of the code with the output?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!