Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- random.seed()
- monster_hp = 20
- print ("Ein Monster taucht auf! \n Was willst du tun? \n Kämpfen(1) Fliehen(2)")
- eingabe = input()
- while monster_hp>0 and eingabe=="1":
- monster_hp = monster_hp - random.randint(1,10)
- print ("Das Monster hat noch " + str(monster_hp))
- eingabe = input("Weiter draufschlagen? \n Kämpfen(1) Fliehen(2)")
- if monster_hp<=0:
- print ("Du hast das Monster besiegt! Du bist ein wahrhafer Held!")
- if eingabe == "2":
- print ("Du bist geflohen. In der nächsten Nacht hat das Monster 10 deiner Gefährten getötet")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement