Commit 64a99d26 by BellCodeEditor

save project

parent 79ecc746
Showing with 4 additions and 2 deletions
...@@ -4,9 +4,10 @@ def SB(): ...@@ -4,9 +4,10 @@ def SB():
try: try:
unit =int(input("请输入:")) unit =int(input("请输入:"))
except: except:
total.append(int(unit))
else:
print("你输入的不是整数,请重新输入。") print("你输入的不是整数,请重新输入。")
else:
total.append(int(unit))
print(total) print(total)
return unit return unit
SB()
print(unit) print(unit)
\ 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