Java and Python Major Project 2
Java and Python Major Project 2
if choice == 1:
print("You tried to tame the snake, but it bit you.")
print("Game over!")
lets_play_again()
elif choice == 2:
print("You fled from the snake room and continue your adventure.")
if choice == 2:
print("You fought bravely against the monster, but it overpowered
you.")
print("Game over!")
lets_play_again()
elif choice == 1:
print("You managed to sneak past the monster and continue your
adventure.")
if play_again.lower() == "yes":
start_game()
else:
print("Thank you for playing the Treasure Hunt Game!")
if choice == "l":
snake_room()
elif choice == "r":
monster_room()
else:
print("Invalid choice! Please enter 'l' or 'r'.")
treasure_position = generate_treasure_position()
attempts = 0
while True:
guess = int(input("Enter your guess (1-20): "))
attempts += 1