Commit 688d7528 by BellCodeEditor

save project

parent 6a91c7a9
Showing with 10 additions and 7 deletions
...@@ -5,11 +5,15 @@ def a_1(): ...@@ -5,11 +5,15 @@ def a_1():
if unit== 'q': if unit== 'q':
break break
try:
unit1=int(unit)
except:
print('输入错误,请重新输入一个数字')
else: else:
total.append(unit) try:
unit1=int(unit)
except:
print('输入错误,请重新输入一个数字')
else:
total.append(unit)
print("-"*30)
print(total) print(total)
print("-"*30) return total
\ No newline at end of file
a_1()
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