第一次python作业(快递价格计算、个人所得税计算、模拟银行存取款)

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值