Text based game : <pre><code>"#TextBasedGame

import random
import time

attackers=random.randint(0,100)
val1=random.randint(0,1)

health=100
bear=100

name=input("What is your name hero? ")
print("Okay ",name," i need to teach you the basics of combat")
time.sleep (1)
print ("Bear spawns")

if val1==0:
    print ("Bear attacks -25 HP")
    health=health -25

    print ("Health = 75")


attack=int(input("Press 1 to attack "))

if attack==1:
    print ("Bears HP -25")
    bear = bear -25
else:
    print ("Why didn't you attack?!?!?")

if bear==100:
    print ("Bear =100")
else:
    print ("Bear =75")"
</code></pre>

<p>If anyone could help me not do each health part and make it print it after every battle / attack that'd help. Please don't make it too complex this is my homework for school and i only started a few weeks ago.</p>
