Files
  • main.py
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
def start():
  print("Hi! What do you want to do tonight?")
  print("Do you want to go on an adventure?")
  answer = raw_input()
  if answer.isalpha() and answer=='yes': 
    print("Get your coat and shoes on!")
    GoOnAdventure()
  else:
    StayHome()

def StayHome():
  print("Well, you are a stick in the mud!")

def GoOnAdventure():
  print("Do you want to go to the beach or the forest?")
  adventure = raw_input()
  if adventure.isalpha() and adventure=='beach': 
    GoToBeach()
  elif adventure.isalpha() and adventure=='forest':
    GoToForest()
  else:
    print("Sorry, I didn't understand you! Try again...")
    GoOnAdventure()

def GoToBeach():
  print("Yay! I love the beach!") 

def GoToForest():
  print("The forest is awesome, let's go!") 


start()
Python 2.7.10 (default, Jul 14 2015, 19:46:27) [GCC 4.8.2] on linux