Commit 656b8e3b by BellCodeEditor

save project

parent 610218da
Showing with 14 additions and 6 deletions
...@@ -5,11 +5,19 @@ def mnm(): ...@@ -5,11 +5,19 @@ def mnm():
if unit== 'q': if unit== 'q':
break break
else: else:
try:
unit = int (unit)
except:
print('wrong')
else:
total.append(unit) total.append(unit)
print(total) print(total)
try: mnm()
age = int (input('how old are you?'))
except: def add(x,y):
print('it must be a 整number') z = x + y
print('finish') print('z的值为:' , z)
\ No newline at end of file return z
result=add(1,2)
\ 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