Commit de688f22 by BellCodeEditor

save project

parent 05e7d622
def func():
total = []
while True:
try:
unit= int(input("请输入:"))
except:
print("请输入整数")
else:
if unit==0:
break
else:
total.append(unit)
print(total)
return total
def jisuan(total):
count = 0
for i in total:
count = count + i
return count
# abc = func()
# jiage = jisuan(abc)
# print(jiage)
import func
data = func.func()
zf = func.jisuan(data)
print("总分是:",zf)
\ 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