Commit 29ba5712 by BellCodeEditor

save project

parent 8bf66e52
Showing with 7 additions and 3 deletions
......@@ -4,13 +4,17 @@
# if unit== 'q':
# break
# else:
# total.append(unit)
# total.append(unit)
# print(total)
total = []
while True:
unit = input("请输入:")
if unit == "q":
break
try:
unit = int(unit)
except:
print("黑小伙子,请输入数字呀!")
else:
total.append(unit)
print(total)
\ No newline at end of file
\ 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