Commit 9df05288 by BellCodeEditor

save project

parent e7845c5d
Showing with 6 additions and 3 deletions
...@@ -2,10 +2,14 @@ ...@@ -2,10 +2,14 @@
if a(): if a():
total = [] total = []
while True: while True:
unit= input("请输入:")
if unit== 'q': if unit== 'q':
break break
else: else:
try:
num=int(unit)
except:
print("请输入数字")
else:
total.append(unit) total.append(unit)
a() a()
print(total)
\ 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