Commit 819f0822 by BellCodeEditor

save project

parent f2a2d82e
def a():
total = []
while True:
unit= input("请输入:")
if unit=='q':
break
else:
try:
unit=int(unit)
except:
print('请输入一个数字')
else:
total.append(unit)
return total
r=a()
def b(r):
sum=0
for i in r:
sum+=i
return sum
print(sum)
# k=r[0]
# print(k)
\ No newline at end of file
import func
date=func.a()
score=func.b(date)
\ 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