Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created August 16, 2020 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/f64cb3bd9d23be996a808c8723503635 to your computer and use it in GitHub Desktop.
Save codecademydev/f64cb3bd9d23be996a808c8723503635 to your computer and use it in GitHub Desktop.
Codecademy export
def cost_of_ground_shp(weight):
flat_charge = 20
if weight <= 2:
return (1.50 * weight) + flat_charge
elif weight > 2 and weight <= 6:
return (3.00 * weight) + flat_charge
elif weight > 6 and weight <= 10:
return (4.00 * weight) + flat_charge
elif weight > 10:
return (4.75 * weight) + flat_charge
print(cost_of_ground_shp(8.0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment