Commit c57d9011 by BellCodeEditor

save project

parent 897dccb6
def sum(list):
t=0
for i in list:
t=t+int(i)
print(str(t))
def new_input():
total=[]
while True:
score=input('分数')
if score=='q':
break
else:
try:
s1=int(score)
except:
print('请输入整数')
else:
total.append(score)
return(total)
import define
define.new_input()
define.sum(total)
\ 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