我正在尝试使用 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"