May-28-2020, 03:24 PM
This has been my latest activity in a python learning course and it turned out sooooooooooooo well that I decided to share it with the community I really appreciate your attention.
Thanks, foksikrasa.
Thanks, foksikrasa.
import time delay = int(input("How many seconds would you like to wait between each quote?")) def print_with_delay(text): print(text) time.sleep(delay) def choose(option1, option2): choice = input(option1 + " or " + option2 + "?").lower() if choice == option1: return option1 elif choice == option2: return option2 else: return None print_with_delay("Chapter one, the way to The Country Of Talking Animals\n------------------------------------------------------") name = input("\nEnter your name, traveler:") print_with_delay(str(name) + " I've been looking all over for you!") print_with_delay("Today I've bought this nekclace but it is special...") print_with_delay("It is a nekclace that will let you transform.") print_with_delay("I've bought it for you, " + str(name)) print_with_delay("It will help you on your adventure now choose. There are two paths.") direction = choose("left", "right") print("Bye traveler!") if direction == "left": print_with_delay("You have decided to save a magic country from the evil wich!") print_with_delay("You travel long and far to come to the magic land surrounded by vast deserts and cold oceans.") print_with_delay("But which way? there are two paths, both are dangerous to choose:") direction = choose("left", "right") if direction == "right": print("You shall set sail in the morning.") elif direction == "left": print("Get ready, for tomorrow might be your last day to live.") else: print("That is not a direction.") elif direction == "right": print("You walk into thick woods but oh no! You find a Goblin, he notices you, and begins to chase you.\n You try to run away but he is too fast for you.") print("GAME OVER the Goblin ate you :(") else: print("That is not a direction.")