Commit fa069e37 by BellCodeEditor

save project

parent 05e7d622
import func
n=func.sd()
s=func.sun(n)
print("这位选手的总分"+str(s)+"分")
\ No newline at end of file
def sd():
total = []
while True:
unit= input("请输入:")
if unit == "q":
break
try:
a=int(unit)
except:
print("请重新输入:")
else:
total.append(a)
return total
d=sd()
def sun(money):
s=0
for i in money:
s=s+i
#print("一共消费"+str(s)+"元")
sun(d)
\ 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