fork download
  1. import random
  2. from time import ctime
  3.  
  4. def game():
  5. # BLow job & gather shit
  6. print '\nTHIS IS A EPIC LEGENDARY BATTLE BETWEEN HUMANS AND ORCS ^-^\n'
  7. hCollect = raw_input("Input the number of humans: ")
  8. oCollect = raw_input("Input the number of orcs: ")
  9. hNum = int(hCollect)
  10. oNum = int(oCollect)
  11. print ''
  12. # how strong is your dick?
  13. hATK = random.randint(0,40)
  14. oATK = random.randint(0,50)
  15. # your true face
  16. while hNum != 0 and oNum != 0:
  17. combatEnd = False
  18. hHP = 155
  19. oHP = 80
  20. while combatEnd == False:
  21. hATKp = hATK
  22. oATKp = oATK
  23. if hATKp > oATKp:
  24. HP_lost = hATKp - oATKp
  25. oHP -= HP_lost
  26. if oATKp > hATKp:
  27. HP_lost = oATKp - hATKp
  28. hHP -= HP_lost
  29. if hHP <= 0:
  30. hNum -= 1
  31. combatEnd = True
  32. if oHP <= 0:
  33. oNum -= 1
  34. combatEnd = True
  35. # Well, let's play!
  36. print "Battle begin!!"
  37. if hNum != 0:
  38. print "Human wins!"
  39. print "%d humans remained" % hNum
  40. if oNum != 0:
  41. print "Orcs win!"
  42. print "%d orcss remained" % oNum
  43.  
  44.  
  45. game()
  46.  
  47.  
Runtime error #stdin #stdout #stderr 0s 11512KB
stdin
Standard input is empty
stdout
THIS IS A EPIC LEGENDARY BATTLE BETWEEN HUMANS AND ORCS ^-^

Input the number of humans: 
stderr
Traceback (most recent call last):
  File "prog.py", line 45, in <module>
  File "prog.py", line 7, in game
EOFError: EOF when reading a line