Commit 29623c27 by BellCodeEditor

save project

parent 5394235a
Showing with 6 additions and 5 deletions
...@@ -3,9 +3,11 @@ def new_input(): ...@@ -3,9 +3,11 @@ def new_input():
while True: while True:
unit= input("请输入:") unit= input("请输入:")
if unit== 'q': try:
break int(unit)
except:
print('要输入整数哦')
else: else:
aaa.append(unit) aaa.append(unit)
print(aaa) print(aaa)
new_input() new_input()
\ 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