added ex31
This commit is contained in:
parent
aa16a38e3f
commit
65d2f55a8b
2 changed files with 42 additions and 0 deletions
21
balazs/python-the-hard-way/ex31/mountain.py
Normal file
21
balazs/python-the-hard-way/ex31/mountain.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
|
||||
while True:
|
||||
print("""You are on a mountain.
|
||||
There is a smaller mountain ahead of you and there is a bigger mountain behind you.""")
|
||||
|
||||
print("Where do you go?")
|
||||
|
||||
print("""1. Forward
|
||||
2. Backward""")
|
||||
|
||||
direction = input("> ")
|
||||
|
||||
if direction == "1":
|
||||
print("You continued your journey forward, and you arrived on a smaller mountain.")
|
||||
|
||||
elif direction == "2":
|
||||
print("You continued your journey backward, and you arrived on a bigger mountain.")
|
||||
|
||||
else:
|
||||
print("You decided to rest, and decide later")
|
21
balazs/python-the-hard-way/ex31/mountain.py~
Normal file
21
balazs/python-the-hard-way/ex31/mountain.py~
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
|
||||
while True:
|
||||
print("""You are on a mountain.
|
||||
There is a smaller mountain ahead of you and there is a bigger mountain behind you.
|
||||
|
||||
Where do you go?
|
||||
|
||||
1. Forward
|
||||
2. Backward"""
|
||||
|
||||
direction = input("> ")
|
||||
|
||||
if direction == "1":
|
||||
print("You continued your journey forward, and you arrived on a smaller mountain.")
|
||||
|
||||
if direction == "2":
|
||||
print("You continued your journey backward, and you arrived on a bigger mountain.")
|
||||
|
||||
else:
|
||||
print("You decided to rest, and decide later")
|
Loading…
Reference in a new issue