4

Having trouble with the following code:

start_over = 1

question = input("Do you wish to try again? y/n: ")
if question == "y":
    start_over -= 1
else:
    raise SystemExit

If they enter y, it goes straight to the else condition.

Solved, was using input instead of raw_input

Matt Walker
  • 171
  • 1
  • 4
  • 12

1 Answers1

5

Just define start_over...it will work

question = raw_input("Do you wish to try again? y/n: ")
start_over = 10
if question == "y":
    start_over -= 1
    print start_over
else:
    raise SystemExit
user1525721
  • 336
  • 5
  • 12