Commit 62cd45bc by BellCodeEditor

save project

parent 6551f765
......@@ -13,14 +13,14 @@ def new_input():
else:
total.append(unit)
return total
def sum(money):
count=0
for i in money:
count=count + i
return count
def sum(money):
count=0
for i in money:
count=count + i
return count
a = new_input()
b = sum(a)
print("你消費了"+str(b)+"元")
\ No newline at end of file
#print("你消費了"+str(b)+"元")
\ No newline at end of file
import func
data = func.new_input()
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