Here is the original task:
*
The Fast Freight Shipping Company charges the following rates:
Weight of Package Rate per Pound
2 pounds or less $1.10
Over 2 pounds but not more than 6 pounds $2.20
Over 6 pounds but not more than 10 pounds $3.70
Over 10 pounds $3.80
Write a program that asks the user to enter the weight of a package and then displays the shipping charges. *
def main():
shipweight=float(input('Please enter the weight of the item you wish to ship: '))
shipping_charges(shipweight)
def shipping_charges(shipweight):
if shipweight <= 2:
print(shipweight,"pounds will cost you $1.10 per pound.")
rate1=1.10
total= rate1 * shipweight
print("Therefore, your total shipping charge would be " total)
elif shipweight <= 6:
print(shipweight,"pounds will cost you $2.20 per pound.")
rate2=2.20
total= rate2 * shipweight
print("Therefore, your total shipping charge would be", total)
elif shipweight <= 10:
print(shipweight,"pounds will cost you $3.70 per pound.")
rate3=3.70
total= rate3 * shipweight
print("Therefore, your total shipping charge would be", total)
elif shipweight > 10:
print(shipweight,"pounds will cost you $3.80 per pound.")
rate4=3.80
total= rate4 * shipweight
print("Therefore, your total shipping charge would be", total)
main()
when i try to run the code, it says invalid syntax. How do I fix it? (make sure you write it using functions only.) thanks