Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def set_door():
- has_key=False
- print("There was the head of a Sphynix on the door knob and it spoke to me\nanswer my riddle and you get the key")
- print("What is he that has four legs in the morning, two in the afternoon and three in the evening")
- print("I know the answer")
- x=input()
- if x=="Man":
- has_key=True
- else:
- has_key=False
- return has_key
- def go_to_room():
- myroom={"east":"My parent's room", "west": "My Brother's Room", "front": "late grandma's room"}
- for key,value in myroom.items():
- print ("I needed to leave that enchanted room")
- print ("I looked around")
- print (key,value)
- print("I run to the ")
- x=input()
- for key, value in myroom.items():
- if x==key:
- r=value
- elif x==value:
- r=value
- return r
- class Rooms():
- def __init__(self):
- self.door="closed"
- self.room="myroom"
- self.description="I woke up to find that the key was gone\n and that the room was locked\n from the outside"
- def get_description(self):
- result=self.description
- return result
- def set_all(self):
- set_door()
- x=set_door()
- print(x)
- if x==True:
- self.door="open"
- else:
- self.door="closed"
- if self.door=="open":
- go_to_room()
- x=go_to_room()
- self.room=x
- else:
- self.room="myroom"
- if self.room=="myroom":
- self.description="fear prevented me from moving.\n A chill run through my back"
- else:
- self.description="It was safer here"
- x=Rooms()
- x.set_all()
- print(x.get_description())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement