-
-
Save chrishwiggins/023d003c2e6795dfb840865e92397bfb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import random | |
u_Health = 10 | |
t_Health = 10 | |
while u_Health*t_Health > 0: | |
they_attack=random.randint(0,1) | |
if they_attack == 0: | |
print ("they attack!") | |
u_Health=u_Health-1 | |
#print (u_Health,t_Health) | |
else: | |
print ("I attack!") | |
t_Health=t_Health-1 | |
#print (u_Health,t_Health) | |
if u_Health == 0: | |
print("you DIED yo") | |
else: | |
print("they DIED yo") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment