Commit 5eb2e2c7 by BellCodeEditor

save project

parent 3fd61942
Showing with 27 additions and 25 deletions
import func import func
ss=func.sum() bb=func.ll()
\ No newline at end of file print("这位选手的总分数为:"+str(bb)+"分")
def num(): def ll():
a=[] def num():
while True: a=[]
try: while True:
b=input("请输入:") try:
if b=='q': b=input("请输入:")
break if b=='q':
b=int(b) break
except: b=int(b)
print("请输入整数,程序错误") except:
else: print("请输入整数,程序错误")
a.append(b) else:
return a a.append(b)
c=num() return a
print(c) c=num()
def sum(money): print(c)
count=0 def sum(money):
for i in money: count=0
count=count+i for i in money:
return count count=count+i
count1 = sum(c) return count
# print("你一共消费了",count1,"元!扫描还是现金呢?") count1 = sum(c)
\ No newline at end of file return count1
# 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