Contact Us:

670 Lafayette Ave, Brooklyn,
NY 11216

+1 800 966 4564
+1 800 9667 4558

Treasure Island Game for Beginner in Python
print('''Welcome to the Treasure Island!\n
                ,"(
               ////\                           _
              (//////--,,,,,_____            ,"
            _;"""----/////_______;,,        //
__________;"o,-------------......"""""`'-._/(
      ""'==._.__,;;;;"""           ____,.-.==
             "-.:______,...;---""/"   "    \(
                 '-._      `-._("   ctr     \
                     '-._                    '._
\n
Your Mission is to find a Treasure!
''')
step1 = input('You\'re at a crossroad. Where do you want to go?\nType "left" or "right"\n')
if step1 == "left":
  step2 = input('You\'ve come to a lake. There is an island in the middle of the lake. Type "wait" to wait for a boat.\nType "swim" to swim across.\n')
  if step2 == "wait":
    step3 = input("You arrive at the island unharmed. There is a house with 3 doors. One red, one yellow and one blue.\nWhich colour do you choose?\n")
    
    if step3 == "red":
      print("It's a room full of fire. Game Over.")
    elif step3 == "blue":
      print("You enter a room of beasts. Game Over.")
    elif step3 == "yellow":
      print('''
      You found the treasure! You Win!
                  __,
               .-'_-'`
             .' {`
         .-'````'-.    .-'``'.
       .'(0)       '._/ _.-.  `\
      }     '. ))    _<`    )`  |
       `-.,\'.\_,.-\` \`---; .' /
            )  )       '-.  '--:
           ( ' (          ) '.  \
            '.  )      .'(   /   )
              )/      (   '.    /
                       '._( ) .'
                    jgs    ( (
                            `-.
      ''')
    elif step2 == "swim":
      print("You fell into a hole. Game Over.")
    else:
      print("You fell into a hole. Game Over.")
  else:
    print('''
    Game Over!
      _///_
     /o    \/
     > ))_./\
        <
    ''')
elif step1 == "right":
  print('''
  Game Over!
        _///_
     /o    \/
     > ))_./\
        <
  ''')
0 0 votes
Article Rating

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x