Ok, so i've been trying to learn how to use def function. I tried to make a simple archery game based on chance.

Code:
import random
loop=1
HP=100
def shot(z):
  if z<50:
   return 50
   print ("Direct Hit")
  elif z >= 50:
   print ("Missed")
while loop==1:
 h=random.random()*100
 n=shot(h)
 choice=raw_input("Pick a shot type(shot, headshot)")
...