Hi, Also, you have a typo in your elif path == '2' statement. It should be rock = input('Do you want to pick up the rock') with one equal sign not rock == input ('Do you want to pick up the rock').
-Andrew On Sat, Oct 15, 2016 at 6:48 PM, Nicholas Hopkins <nicholas_hopki...@hotmail.com> wrote: > 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@01D22792.63CCF290] > Thanks > Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor