Here's the code I need to loop:
dmg = random.randrange(1, 10, 1)
print "You have decided to attack the giant rat."
ratHP = 100
ratHPN = ratHP-dmg
print "you did" , dmg , "damge to the rat, giving it" , ratHPN , "left"
ratHP = ratHPN
If you need the entire code;
import random
print ">>If you don't type one of the choices exactly right, you'll need to restart<<"
print "Welcome, to this text adventure!"
name = raw_input("Please enter your name:")
print "So your name is " + name + "?"
raw_input("Press ENTER")
userHP = 100
print "Which dungeon do you wish to go to?"
print "Hope"
print "Grassy"
dungeon1 = raw_input("Which dungeon:")
if dungeon1 == "Grassy":
print "So, you have chosen the Grassy Dungeon..."
raw_input("Press ENTER")
print "After exploring the caves, for 15 minutes, you run into a giant rat."
raw_input("Press ENTER")
print "Attack"
print "Run"
battle = raw_input("Select your action:")
if battle == "Attack":
dmg = random.randrange(1, 10, 1)
print "You have decided to attack the giant rat."
ratHP = 100
ratHPN = ratHP-dmg
print "you did" , dmg , "damge to the rat, giving it" , ratHPN , "left"
ratHP = ratHPN
if dungeon1 == "Hope":
print "So, you have chosen the Hope Dungeon..."
raw_input("Press ENTER")