Commit 8601091a by BellCodeEditor

save project

parent 91286450
Showing with 11 additions and 8 deletions
...@@ -4,12 +4,14 @@ def new_input(): ...@@ -4,12 +4,14 @@ def new_input():
unit= input("请输入:") unit= input("请输入:")
if unit== 'q': if unit== 'q':
break break
try:
unit=int(unit)
except:
print("输错了")
else: else:
total.append(unit) try:
print("$"*30) unit=int(unit)
print(total) except:
new_input() print("输错了")
else:
total.append(unit)
print("$"*30)
return total
a=new_input()
print(a)
\ 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