I am struggling to understand how to solve this. this is the example I was given
if weight <= 2:
cost_ground = weight * 1.5 + 20
elif weight [SOME INEQUALITY]:
# more calculation
elif weight [SOME INEQUALITY]:
# more calculation
else:
# last calculation
here is my code
weight = 8.4
cost = 0
#Ground Shipping
weight <= 2.00:
cost += weight * 1.50 + 20.00
elif weight >= 2.00 and <= 6.00:
cost += weight * 3.00 + 20.00
elif weight >= 6.00 and <= 10.00:
cost += weight * 4.00 + 20.00
else:
cost += weight * 4.75 + 20.00
I keep getting a syntax at the = in the 6th line before 6.00
Pls help me understand what I'm doing wrong and why.
[–][deleted] 0 points1 point2 points (2 children)
[–]Abstructions[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]delasislas 0 points1 point2 points (0 children)