Luggage_Weight=int(input("输入你的行李总重量:"))
Is_First=int(input("是否为头等舱?1为是,0不是:"))
Is_Home=int(input("是否为国内乘客?1为是,0不是:"))
Is_physical=int(input("是否为残疾乘客?1为是,0不是:"))
tota=Luggage_Weight-30
if Luggage_Weight>30:
if Is_First and Is_Home:
print("你的运费为:",tota*4)
elif Is_First==0 and Is_Home:
print("你的运费为:",tota * 6)
elif Is_First==0 and Is_Home==0:
print("你的运费为:",tota * 12)
elif Is_physical and Is_First==0:
print("你的运费为:",tota * 3)
else:
print("输入错误!!!")
else:
print("你的行李总总量小于30kg,享受免费托运")
计算航空公司乘客行李托运费。实验要求及原理:某航空公司规定,乘客可以免费托运重量不超过30公斤的行李,当行李重量超过30公斤时,对头等舱的国内乘客超重部分每公斤收费4元等等
最新推荐文章于 2023-06-16 14:05:50 发布