import random
from random import choice
import time
from time import sleep
def print_pause(message_to_print):
print(message_to_print)
time.sleep(2)
#dragon’s house
def dragon_house():
print_pause(“You approach the door of the house.”)
print_pause(“You are about to knock when the door opens and” “out steps a dragon.”)
print_pause(“Eep! This is the dragon’s house!”)
print_pause(“The dragon finds you!”)
print_pause(“You feel a bit under-prepared for this,” “what with only having a tiny,” “rusty old magic wand.”)
#troll house
def troll_house():
print_pause(“You approach the door of the house.”)
print_pause(“You are about to knock when the door opens and” “out steps a troll.”)
print_pause(“Eep! This is the troll’s house!”)
print_pause(“The troll finds you!”)
print_pause(“You feel a bit under-prepared for this,” “what with only having a tiny,” “rusty old magic wand.”)
#pirate’shouse
def pirate_house():
print_pause(“You approach the door of the house.”)
print_pause(“You are about to knock when the door opens and” “out steps a pirate.”)
print_pause(“Eep! This is the pirate’s house!”)
print_pause(“The dpirate finds you!”)
print_pause(“You feel a bit under-prepared for this,” “what with only having a tiny,” “rusty old magic wand.”)
#witch’s house
def witch_house():
print_pause(“You approach the door of the house.”)
print_pause(“You are about to knock when the door opens and a witch” “out steps.”)
print_pause(“Eep! This is the witch’s house!”)
print_pause(“The dragon finds you!”)
print_pause(“You feel a bit under-prepared for this,” “what with only having a tiny,” “rusty old magic wand.”)
houses = [ witch_house, troll_house, dragon_house, pirate_house]
def cave():
print_pause(“You peer cautiously into the cave.”)
print_pause(“It turns out to be only a very small cave.”)
print_pause(“Your eye catches a glint of metal behind a rock.”)
print_pause(“you have found the magical Wand of Ogoroth!”)
print_pause(“You discard your rusty old magic wand and take the Wand of Ogoroth with you.”)
print_pause(“You walk back out to the field.”)
print_pause(“You find yourself standing in an open field, filled with grass and yellow wildflowers.”)
print_pause(" Rumor has it that a wicked fairy is somewhere around here and has been terrifying the nearby village.")
print_pause(“In front of you is a house.”)
print_pause(“To your right is a dark cave.”)
print_pause(“In your hand you hold your trusty (but not very effective magic wand.”)
x= input()
if x == 1:
** print(random.choice(houses)**
elif x > 1 < 3:
** print(cave)**
else:
** print(“please enter 1 or 2”)**
print_pause(“Enter 1 to knock on the door of the house.”)
print_pause(“Enter 2 to peer into the cave.”)
print_pause(“What would you like to do?”)
print_pause(“Please enter 1 or 2.”)