Python学习笔记5-----实际应用-3 New!
本帖最后由 极品召唤兽 于 2020-7-22 12:32 编辑def calc_profit(n):
price =24
cost = 8
profit = (price - cost) * n - 500
return profit
def calc_perf(x):
if x > 2000:
print('合格')
else:
print('不合格')
n = int(input('请输入今天咖啡店的销量'))
calc_perf(calc_profit(n))
def welcome(name) :
print('欢迎光临'+ name)
welcome(input('请输入姓名:'))
https://ftp.bmp.ovh/imgs/2020/07/bf62112f1e8b6c68.png
https://t1.picb.cc/uploads/2020/07/22/tqWePG.png
https://t1.picb.cc/uploads/2020/07/22/tqWePG.png defwelcome(name):
print("欢迎光临 %s"%name)
welcome(input("请输入你的名字:") {:5_95:}
页:
[1]