Advertisement
baggiepr

Adventure Coding by Hannah Y6 Orchard Lea Junior School

Jan 29th, 2013
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.73 KB | None | 0 0
  1. from time import sleep
  2. import sys
  3. bravery=5
  4. equip=["garlic","zapper","ghostbuster","shield"]
  5. print("""Welcome to the Haunted House!
  6. In store for you are some of the scaaaaaariest tasks you will ever do!
  7. Good Luck!""")
  8. input("Type'yes'to carry on.")
  9. name=input("What is your name?")
  10. print("""
  11. """,name,"""Welcome to the Hauuuuuunted House!
  12. """)
  13. sleep(3.0)
  14. input("Type go to continue")
  15. print("""
  16. As you step inside the door and walk nervously down the errie cobwebbed hall,
  17. a disembodied hand comes floating towards you.You start trembling.
  18. """)
  19. sleep(3.2)
  20. event1=input("Press s to sneak past or z to zap it")
  21. sleep(2.0)
  22. if event1=="s":
  23.     print("""
  24.    You are a coward!You just manage to escape but it
  25.    won't happen again!""")
  26.     bravery=bravery-2
  27. else:
  28.     print("""Well done!You succcessfully killed the horrible hand.""")
  29.     bravery=bravery+2
  30.  
  31. print("You have",bravery,"bravery points and this equipment",equip)
  32. sleep(3.0)
  33. print("""
  34. You go upstairs, shaken by what has just happened to you.
  35. Suddenly, a hooded vampire with huge fangs jumps out at you and you scream.
  36. You then gain cofidence again and do something to defend yourself.What is it?
  37. """)
  38. sleep(2.0)
  39. event1=input("Press g to use garlic or a to scream at it and scare it away. ")
  40. sleep(2.0)
  41. if event1=="g":
  42.     print("""
  43.    You made the right choice. Vampires aren't able to tolerate garlic
  44.    and the vampire collapsed in a heap.
  45.    """)
  46.     bravery=bravery+2
  47. else:
  48.     print("""Oh no! The vampire just got hungrier. Watch out! You escaped but next time
  49.    you won't be so lucky.""")
  50.     bravery=bravery-2
  51. sleep(2.0)
  52. print("You have",bravery,"bravery points and this equipment",equip,)
  53. if bravery <= 0:
  54.     print(name," is dead")
  55.     sys.exit(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement