猫史档案馆


【Python作品分享】收停车费.v1【教程贴】

用户:W莫斯科客MW莫斯科客M查看:0 回复:0 评论:0 创建时间:2023-02-03T09:40:31


【作品展示】

center_image

 

【作品介绍】

收停车费

 

【作品源代码】

# 收停车费.py

# 先设置变量值
time = 0
price = 0
money = 0
# 问名字
name = input("*what's your name?\n")
print("OK!",name,"...")
# 问停了多少分钟
time = eval(input("*how many minutes did you stop?\n"))
# 问一分钟多少钱
price = eval(input("*how much is it for a minute?\n"))
money = time * price
# 告诉你需要的钱
print("OK!", name, "you need to hand in:", money, "yuan,please.")

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页