Skip to content

Instantly share code, notes, and snippets.

@niloy-barua
Last active January 18, 2017 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niloy-barua/6dc32d972827ac9e39ad802fe3692949 to your computer and use it in GitHub Desktop.
Save niloy-barua/6dc32d972827ac9e39ad802fe3692949 to your computer and use it in GitHub Desktop.
background="******************\n******************\n☺\n******************\n******************"
i = 1 #to keep track where the user is in the "woods"
n='right'
while n=='right' or i>0:
print(background)
n=input("you are in the lost woods, What do you do?\nGo left or right?(type in)\n")
if n=='right':
i+=1
elif n=='left':
i-=1
else:
print('invalid input')
print('\n-------------------\n☺ - - - - - -\n-------------------\n')
print("you are out of the woods. Congratulations!!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment