Commit 78de4443 by BellCodeEditor

save project

parent f18bb5fe
Showing with 16 additions and 7 deletions
total = [] total = []
while True: while True:
unit= input("请输入:") unit= input("请输入(q退出):")
if unit== 'q': if unit== 'q':
break break
try:
unit = int(unit)
except expression as identifier:
pass
else: else:
total.append(unit) except:
print(total) print("请重新输入数字")
\ No newline at end of file else:
total.append(unit)
print("-"*30)
print(total)
new_input()
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