Answer the question
In order to leave comments, you need to log in
How to fix an error in a conditional statement?
age = int(input('How old are you? '))
procced = ('Do you want to play again?')
if age<18:
print('You lost!')
print(procced)
if procced == 'No':
breack
Error:
Traceback (most recent call last):
File "", line 1, in
No
NameError: name 'No' is not defined
>>>
Answer the question
In order to leave comments, you need to log in
You didn't post all the code. And make out the code with the appropriate tag.
Everything is written in the description of the error. In the very first line of code (which you apparently didn't specify) you are accessing the No variable , which is not yet defined.
And " break " is spelled a little differently...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question