From 8321e98ea06e7e6f7c7fd8d9fdb6a5995947cc36 Mon Sep 17 00:00:00 2001 From: cily <96931823+cily-yyds@users.noreply.github.com> Date: Thu, 25 Apr 2024 20:00:25 +0800 Subject: [PATCH] Update choose_your_own_adventure.py more readable and fix wrong word --- choose_your_own_adventure.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/choose_your_own_adventure.py b/choose_your_own_adventure.py index b91083e..3a3fcdb 100644 --- a/choose_your_own_adventure.py +++ b/choose_your_own_adventure.py @@ -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!")