1. Engineering
  2. Computer Science
  3. i keep getting error saying continue is out of loop...

Question: i keep getting error saying continue is out of loop...

Question details

i keep getting error saying continue is out of loop? checked everything a million times not sure whats wrong


while True:

answer = str(input('Would you like to order more tickets? (y/n): '))

if answer in ('y', 'n'):

break

print("invalid input.")

if answer == 'y':

continue

else:

print("Goodbye")

break
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution