Commit 83ebf4ee by BellCodeEditor

auto save

parent 59452b83
Showing with 22 additions and 0 deletions
def input_new():
u=[]
while True:
u=input("输入菜单价格(q退出):")
if u == "q":
break
try:
u=int(u)
except:
print("请重新输入一个数字")
else:
return u
finally:
print("*"*30)
def sum(edj):
m=0
m=m+u
return m
ge=input_new()
jkl=sum(ge)
print("价格为"+str(jkl))
\ No newline at end of file
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