Question: #### This is written for Python 2.7 ### Debug this simple game program. The game should generate a random number between 0 and 100 ###

#### This is written for Python 2.7

### Debug this simple game program. The game should generate a random number between 0 and 100 ### when the user hits Enter. The user can stop the game by typing "Stop". ### A score over 50 should result in a win.

import random

roll = raw_input("Press Enter to Spin the Wheel or Type ""Stop""!") prize = random.randint(0,100)

while roll == " ": print ("You're number is(prize)!") if prize < 50: print "Sorry, you didn't win. Try again" if prize > 50: print "Congratulations! You're a winner!" if roll == "Stop": print "Thank you for playing" else: print "Well, so long!"

## I have fixed several of the errors, but I cannot get it to continue to play as long as the user wants to play. I also do not know how to get it to display the number that it randomly picks.

### Locate and fix the multiple syntax errors """I no longer get syntax errors."

Ensure that the multiple loops/flow control statements function properly """ I am pretty sure they are not functioning right. """

Edit the code to account for case-sensitivity of the Stop command """ Stop as it is does not even stop the program"""

Account for the edge case of 50 being neither a win nor a loss

Include a brief summary of your debugging process and the errors you corrected

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!