Commit a44626ae by BellCodeEditor

save project

parent 05e7d622
def abcd():
s=[]
while True:
w=input("请输入")
if w=='q':
break
else:
try:
w=int(w)
except:
print("请输入数字")
else:
s.append(w)
return s
def sum(mon):
c=0
for i in mon:
c=c+i
return c
#
import func
data=func.abcd()
score=func.sum(data)
print("总分:"+str(score))
\ 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