Commit 4b649052 by BellCodeEditor

save project

parent 78239689
Showing with 14 additions and 9 deletions
def menu(): def menu():
total = [] total = []
while True: while True:
unit= input("请输入:") unit= input("请输入:")
if unit== 'q': try:
break unit= int(input("请输入:"))
else: except:
total.append(unit) primt("你输入有误,请输入数字")
print(total) if unit== 'q':
\ No newline at end of file break
else:
total.append(unit)
print(total)
menu()
\ 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