Commit 8fe9a14c by BellCodeEditor

save project

parent 2ba95f50
Showing with 21 additions and 12 deletions
...@@ -5,5 +5,5 @@ try: ...@@ -5,5 +5,5 @@ try:
except: except:
print("请输入整数") print("请输入整数")
else: else:
a.append(int(b)) a.append(b)
print(a) print(a)9
\ No newline at end of file \ No newline at end of file
total = []
while True: def nn():
unit= input("请输入:") total = []
if unit== 'q': while True:
break unit= input("请输入:")
else: if unit== 'q':
total.append(unit) break
print(total) else:
\ No newline at end of file try:
int(unit)
except:
print("请输入整数")
else:
total.append(int(unit))
return total
mm=nn()
print(mm)
\ 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