Last active
January 18, 2017 14:15
-
-
Save niloy-barua/6dc32d972827ac9e39ad802fe3692949 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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