Commit a7d82d1c by BellCodeEditor

save project

parent 4aefb621
Showing with 2 additions and 5 deletions
...@@ -3,14 +3,12 @@ def abcd(): ...@@ -3,14 +3,12 @@ def abcd():
while True: while True:
unit= input("请输入:") unit= input("请输入:")
try: try:
int(unit) unit=int(unit)
except: except:
print("填整数") print("填整数")
else: else:
print("mc") total.append(unit)
if unit== 'q': if unit== 'q':
break break
else:
total.append(unit)
print(total) print(total)
abcd() abcd()
\ 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