Commit de98108f by BellCodeEditor

save project

parent dc70412a
Showing with 27 additions and 0 deletions
def new():
t=[]
print("*"*30)
while True:
u=input("请输入菜的价格:")
if u=="q":
break
else:
try:
u=int(u)
print("*"*30)
except:
print("请输入数字!")
print("*"*30)
else:
t.append(u)
return t
w1=new()
print(w1)
def jjj(money):
c=0
for i in money:
c=c+i
return c
f=jjj(w1)
print(str(f))
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