Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions choose_your_own_adventure.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name = input("Type your name: ")
name = input("Type your name:\n")
print("Welcome", name, "to this adventure!")

answer = input(
"You are on a dirt road, it has come to an end and you can go left or right. Which way would you like to go? ").lower()
"You are on a dirt road, it has come to an end and you can go left or right. Which way would you like to go? \n").lower()

if answer == "left":
answer = input(
"You come to a river, you can walk around it or swim accross? Type walk to walk around and swim to swim accross: ")
"You come to a river, you can walk around it or swim across? Type walk to walk around and swim to swim accross: \n")

if answer == "swim":
print("You swam acrross and were eaten by an alligator.")
print("You swam acrross and were eaten by an alligator.\n")
elif answer == "walk":
print("You walked for many miles, ran out of water and you lost the game.")
print("You walked for many miles, ran out of water and you lost the game.\n")
else:
print('Not a valid option. You lose.')

elif answer == "right":
answer = input(
"You come to a bridge, it looks wobbly, do you want to cross it or head back (cross/back)? ")
"You come to a bridge, it looks wobbly, do you want to cross it or head back (cross/back)? \n")

if answer == "back":
print("You go back and lose.")
elif answer == "cross":
answer = input(
"You cross the bridge and meet a stranger. Do you talk to them (yes/no)? ")
"You cross the bridge and meet a stranger. Do you talk to them (yes/no)? \n")

if answer == "yes":
print("You talk to the stanger and they give you gold. You WIN!")
Expand Down