用户:
Mzd大帅哥查看:0 回复:1 评论:0 创建时间:2023-11-18T17:30:39
【作品展示】

【作品介绍】
u
【作品源代码】
import math
print('欢迎乘坐长沙地铁。')
x = int(input('请问乘坐几号线?'))
if (x <= 6 and x > 0):
print('好的。')
else:
print('滚')
n = int(input('请问乘坐几站?'))
if (n >= 0 and n <= 5):
print(((1 / 2) * n), '0元,请支付。')
if (n > 5 and n <= 10):
print((math.floor(5 / 4) * n - 2), '.00元,请支付。')
if (n > 10 and n <= 15):
print((math.floor(4 / 3) * ((6 + 2 * (n - 10)) + 1)), '.00元,请支付。')
if (n > 15 and n <= 100 or n <= 0):
print('滚')
if (n > 100):
print('Are you crazy?')
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn