我正在尝试使用Python创建一个计算运输成本的程序。
然而,我无法运行程序使其正常工作。
无论我的总额是多少,美国的费用都是6美元,加拿大的费用都是8美元。我似乎无法超越这个问题。
total = raw_input('What is the total amount for your online shopping?')
country = raw_input('Shipping within the US or Canada?')
if country == "US":
if total <= "50":
print "Shipping Costs $6.00"
elif total <= "100":
print "Shipping Costs $9.00"
elif total <= "150":
print "Shipping Costs $12.00"
else:
print "FREE"
if country == "Canada":
if total <= "50":
print "Shipping Costs $8.00"
elif total <= "100":
print "Shipping Costs $12.00"
elif total <= "150":
print "Shipping Costs $15.00"
else:
print "FREE"