Sal's Shipping is Complete!

Hello everyone, I have finished Sal’s Shipping project and I would like to share my code!

def ground_shipping(weight, premium_boolean):
  if (weight <= 0):
    print("Weight cannot be zero or negative!")
  if (weight <= 2):
    if premium_boolean == True:
      return (weight * 1.50) + 145.00
    else:
      return (weight * 1.50) + 20.00
  elif (weight <= 6):
    if premium_boolean == True:
      return (weight * 3.00) + 145.00
    else:
      return (weight * 3.00) + 20.00
  elif (weight <= 10):
    if premium_boolean == True:
      return (weight * 4.00) + 145.00
    else:
      return (weight * 4.00) + 20.00
  else:
    if premium_boolean == True:
      return (weight * 4.75) + 145.00
    else:
      return (weight * 4.75) + 20.00

def drone_shipping(weight):
  if (weight <= 0):
    print("Weight cannot be zero or negative!")
  if (weight <= 2):
    return weight * 4.50
  elif (weight <= 6):
    return weight * 9.00
  elif (weight <= 10):
    return weight * 12.00
  else:
    return weight * 14.25

Through creating this project, I actually learned something new. I always thought that if, elif, and else-statements have a parallel structure. For example, the input goes and tries to enter all of the loops. Only the statements that have the same restrictions as the input will let in into the loop. But now, I found out that it is more of a “Top-Down” structure.

Looking back, this would be around my 3rd year of coding anniversary! Man has time flew!