adventure.py
adventure.py
def choice_1():
choice = input("Type 'yes' to enter the cave or 'no' to stay outside:
").lower()
if choice == "yes":
print("You step inside, the darkness envelops you. What do you do next?")
choice_2()
else:
print("You decide not to enter the cave. Game over.")
def choice_2():
print("Inside the cave, you see two paths: one to the left and one to the
right.")
choice = input("Type 'left' to go left or 'right' to go right: ").lower()
if choice == "left":
print("You walk down the left path and discover a hidden treasure chest!")
print("Congratulations, you win!")
elif choice == "right":
print("You walk down the right path and fall into a pit. You have died.")
else:
print("Invalid choice. Please type 'left' or 'right'.")
choice_2()