Sal's Shipping Python3 - UnboundLocalError:

Hi I am trying to do the exercise “Sal’s Shipping”. I watched the video too and already searched for the UnboundLocalError: message but I still dont understand it and have no idea why I am getting this error message. Can someone help me please?
Below is my code.

def costs_ground_shipping(weight):
  if weight <= 2:
    prie_per_pound = 1.50
  elif weight <= 6:
    price_per_pound = 3.00
  elif weight <= 10:
    price_per_pound = 4.00
  else:
    price_per_pound = 4.75
  return 20 + (price_per_pound * weight)
print(costs_ground_shipping(8.4))

premium_ground_shipping = 125.0

def drone_shipping(weight):
  if weight <=2:
    prie_per_pound = 4.50
  elif weight <= 6:
    price_per_pound = 9.00
  elif weight <= 10:
    price_per_pound = 12.00
  else:
    price_per_pound = 14.25
  return price_per_pound * weight
print(drone_shipping(1.5))
   

And this is the error message:
Traceback (most recent call last):
File “script.py”, line 25, in
print(drone_shipping(1.5))
File “script.py”, line 24, in drone_shipping
return price_per_pound * weight
UnboundLocalError: local variable ‘price_per_pound’ referenced before assignment

In your drone shipping methods first if statement
prie_per_pound = 4.50

Typo should read price_per_pound

Oh lol I looked several times and didnt see it! Now its working, thank you very much!! :slight_smile: