1、快递价格计算器:
要求:
提示用户输入:1、重量 2、地点编号
快递费算法:首重:3公斤
3公斤以内:东三省/宁夏/青海/海南:12元 新疆/西藏:20元 港澳台/国外:不接受寄件 其它:10元
超过3公斤部分:东三省/宁夏/青海/海南:10元/公斤 新疆/西藏:20元/公斤 港澳台/国外:联系总公司 其它:5元/公斤
输入:1、重量 2、地点编号
输出:快递价格
area_name = ['0:东三省/宁夏/青海/海南','1:新疆/西藏','2:港澳台/国外','其他']
area_price = [12,20,'不接受邮寄','10']
area_overprice = [10,20,'联系总公司',5]
print(area_name)
def price_calculate():
if weigth<3:
if (int(area_code)==2):
print(area_price[area_code])
else:
print(area_price[area_code])
else :
if (int(area_code)==2):
print(area_overprice[area_code])
else:
print((weigth-3)*area_overprice[area_code]+area_price[area_code])
if __name__ == '__main__':
try:
weigth = i