Python: Program unexpectedly terminates
I used Sublime Text 2 and ran the program in the terminal. Here is the code:
print("Welcome to QuizWow!")
while True:
question = input("Enter the number of questions you will ask (up to
10): ")
###Program terminates after input: 'question' is answered by the user.
if question == '1':
qonea = input("Enter the question here: ")
qoneaa = input("Enter the answer here: ")
print ("1: ", qonea)
qoneaguess = input("Enter your guess here: ")
if qoneaguess == qoneaa:
print ("Correct")
else:
print ("Incorrect")
No comments:
Post a Comment