Commit a65518e1 by BellCodeEditor

save project

parent 49d7b2b3
Showing with 8 additions and 2 deletions
try: try:
age=int(input("你今年几岁")) age=int(input("你今年几岁"))
except: except:
print("'”“”“"') print("")
\ No newline at end of file \ No newline at end of file
...@@ -5,6 +5,12 @@ def new_input(): ...@@ -5,6 +5,12 @@ def new_input():
if unit== 'q': if unit== 'q':
break break
else: else:
try:
unit=int(unit)
except:
print('请输入一个数字')
else:
print()
total.append(unit) total.append(unit)
print(total) print(total)
new_input() new_input()
......
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