Commit 21a5d5a3 by BellCodeEditor

save project

parent 671b74ab
Showing with 7 additions and 5 deletions
def new_input(): def new_input():
total = [] total = []
while True: while True:
unit= int(input("请输入:")) unit= int(input("请输入:q退出"))
if unit=='q': if unit=='q':
break break
else: else:
...@@ -11,6 +11,9 @@ def new_input(): ...@@ -11,6 +11,9 @@ def new_input():
print("输一个数") print("输一个数")
else: else:
total.append(unit) total.append(unit)
print(total) print("当前菜单价格为:"+str(total))
return total finally:
price=new_input() print("程序结束")
\ No newline at end of file return total
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