[Tutor] Python help
Nicholas Hopkins
nicholas_hopkins1 at hotmail.com
Sat Oct 15 18:48:08 EDT 2016
Hello
Please tell me what is wrong with my code and how I can put an if else statement inside of another if else statement
This is my code:
path = input('Which path number will you take?')
if path == '1':
print('You took the first path')
elif path == '2':
print('You choose to take the second path')
print('You see a rock')
rock == input('Do you want to pick up the rock')
if rock == 'yes':
print('you picked up the rock')
else:
print('You left the rock')
elif path == '3':
print('You choose to take the third path')
else:
print('You must choose a number between 1 and 3')
it comes up with this error
[cid:image001.png at 01D22792.63CCF290]
Thanks
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
More information about the Tutor
mailing list