Commit 5c444c3f by BellCodeEditor

save project

parent 05e7d622
Showing with 28 additions and 0 deletions
import re
gb=re.w()
bg=re.sum(w)
print(bg)
\ No newline at end of file
def w():
total=[]
while True:
unit=input("请输入!!!!!!!!!!你************************!")
if unit=="q":
break
else:
try:
jntm=int(unit)
except:
print('输入整数')
else:
total.append(jntm)
return total
def sum(w):
ww=0
for i in w:
ww=ww+i
return ww
y=w()
r=sum(y)
print(r)
\ 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