# 用python编写购买地铁车票的规定如下:乘1-4站,3元/位;乘5-9站,4元/位;乘9站以上,5元/位,
# 编写一个程序:(1) 输入人数、站数,输出应付款;
people = int(input('请输入人数:'))
station = int(input('请输入站数:'))
if 0<station<=4:
money=people*3
print(money,"元")
if 4<station<=9:
money=people*4
print(money,"元")
if 9<station:
money=people*5
print(money,"元")
04-08
2755
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-02
3807
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-27
1147
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-07
1675
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-28
1113
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交