Commit 3f42dc3a by BellCodeEditor

save project

parent 05e7d622
import func
date=func.py(new_input)
ty=func.py(new_input)
print("成绩为"+date)
\ No newline at end of file
def new_input():
total = []
while True:
unit=input("请输入:q退出")
if unit=='q':
break
else:
try:
unit=int(unit)
except:
print("输一个数")
else:
total.append(unit)
print("当前菜单价格为:"+str(total))
return total
price=new_input()
def clac(price):
sum=0
for i in price:
sum+=i
return sum
count=clac(price)
print('总价:'+str(count))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment