0
I created this script, but is giving this following error:
print('Choices\n1-Option 1\n2-Option 2\n3-Option 3')
if choose =='1':
print('The account is 5+5')
elif choose =='2':
print('The account is 6+6')
elif choose =='3':
print('The account is 7+9')
else:
print('You choose none options')
Error:
Traceback (most recent call last): File "main.py", line 11, in <module> if choice =='1': NameError: name 'choice' is not defined
Can anyone tell me what is wrong? Since a few days ago the program ran normally? By the way, I’ve driven in python, pycharm and go online, and nothing working
Can I edit your question? There is part unformatted Python code.
– Maury Developer
Where’s the full code? You declared Choice earlier?
– Maury Developer
@Maurydeveloper the tag [python] in the question already applies Highlight in the post, no need to add explicitly in this case with ````Pyton, just the tag in the question that the system does the rest.
– Guilherme Nascimento
Okay. Thanks for the info.
– Maury Developer