Commit 1393faf7 by BellCodeEditor

save project

parent 8017a13c
import func
data = func.new_input()
score = func.sum(data)
print("总分数为:"+str(score))
\ No newline at end of file
...@@ -13,4 +13,10 @@ def new_input(): ...@@ -13,4 +13,10 @@ def new_input():
total.append(unit) total.append(unit)
print("-"*30) print("-"*30)
print(total) print(total)
new_input() new_input()
\ No newline at end of file
def sum(unit):
count = 0
for i in unit:
count += i
return count
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