Commit db468e58 by BellCodeEditor

save project

parent 17948955
import func import func
a=func.totol a=func.totol()
c=b(a) c=func.b()
print("您总共消费",c,"元") print("您总共消费",c,"元")
\ No newline at end of file
...@@ -13,11 +13,11 @@ def totol(): ...@@ -13,11 +13,11 @@ def totol():
total.append(unit) total.append(unit)
#print(total) #print(total)
return total return total
def b(c): def b(s):
sum=0 sum=0
for i in c: for i in s:
sum=sum+i sum=sum+i
return sum return sum
#a=totol() a=totol()
#c=b(a) c=b(a)
#print("总和是",c) print("总和是",c)
\ No newline at end of file \ 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