The question asks you to write an if/elif/else statement based on the ground shipping table in the intro. So, you have to write it based on the weights supplied in that table.
You’re not returning anything and the conditions are a a bit off.
You have to follow the chart weights as it’s listed above. The first if should look like this:
if (weight <= 2.0):
return flatcharge + (weight * 1.50)
(Note: I have flatcharge defined in the function just above the conditional statements, flatcharge = 20). I think that’s another question following 2)
Think of control flow like, “If this, then this.”
"if the weight is this___then do this, elif the weight is this ___ , then do this, etc. The “do” part in this scenario is the return statement, which is the cost. If the first condition is met, a value will be returned. If it’s not met, then it goes to the elifs, etc.
The else part is a bit off. It should cover everything else if the previous conditions are not met.
You already have it set to, elif weight >= 10:, and then you have else: weight > 10... which is incorrect. The else condition covers every other scenario not already covered by the previous conditions.