天天看點

快遞計費

快遞計費
`print('*' * 20)
print("<<<<cq快遞>>>")
print('*' * 20)
print("<<費用計價方式>>")
print('$' * 20)
print("華東地區:(1);首重(<= 2kg):13元;續重:3元")
print("華南地區:(2);首重(<= 2kg):12元;續重:2元")
print("華北地區:(3);首重(<= 2kg):14元;續重:4元")
print('$' * 20)
User_name = input("請輸入管理者姓名:")
User_password = input("請輸入密碼:")
print(f'歡迎{User_name}使用cq快遞結算系統')
choice_here = int(input("請輸入收貨人的位址編号"))
if choice_here == 1:
    print("收貨人的位址是華東")
    choice_weight = int(input("請輸入物品的重量:"))
    if choice_weight <= 2:
        money = choice_weight * 13;
    else:
        money = 13 * 2 + (choice_weight - 2) * 3;
elif choice_here == 2:
    print("收貨人的位址是華南")
    choice_weight = int(input("請輸入物品的重量:"))
    if choice_weight <= 2:
        money = choice_weight * 12;
    else:
        money = 12 * 2 + (choice_weight - 2) * 2;
else:
    print("收貨人的位址是華北")
    choice_weight = int(input("請輸入物品的重量:"))
    if choice_weight <= 2:
        money = choice_weight * 14;
    else:
        money = 14 * 2 + (choice_weight - 2) * 4;
print(f'該快遞的費用{money}')
print("系統退出,歡迎你下次使用")`