Commit d09913ed by BellCodeEditor

save project

parent 58919531
Showing with 12 additions and 25 deletions
...@@ -12,16 +12,7 @@ def new_input(): ...@@ -12,16 +12,7 @@ def new_input():
else: else:
total.append(unit) total.append(unit)
print("-"*30) print("-"*30)
return total print(total)
def m(q): new_input()
c=0 \ No newline at end of file
for i in q:
c=c+i
return c
p=new_input()
n=m(p)
print(n)
\ No newline at end of file
q=[15,14,16,25] try:
def m(): age = int(input('你几岁'))
c=0 except:
for i in q: print('输整数')
c=c+i else:
return c if age <18:
print('不可喝酒111')
print('结束')
p=new_input() \ No newline at end of file
n=m(p)
print(n)
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