Commit 5eb2e2c7 by BellCodeEditor

save project

parent 3fd61942
import func import func
ss=func.sum() bb=func.ll()
\ No newline at end of file print("这位选手的总分数为:"+str(bb)+"分")
def num(): def ll():
def num():
a=[] a=[]
while True: while True:
try: try:
...@@ -11,12 +12,13 @@ def num(): ...@@ -11,12 +12,13 @@ def num():
else: else:
a.append(b) a.append(b)
return a return a
c=num() c=num()
print(c) print(c)
def sum(money): def sum(money):
count=0 count=0
for i in money: for i in money:
count=count+i count=count+i
return count return count
count1 = sum(c) count1 = sum(c)
# print("你一共消费了",count1,"元!扫描还是现金呢?") return count1
\ No newline at end of file # print("你一共消费了",count1,"元!扫描还是现金呢?")
\ 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