Commit 9c1097a6 by BellCodeEditor

save project

parent 60313876
Showing with 30 additions and 0 deletions
def k():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
a=int(unit)
except:
print("请输入一个整数哦~")
else:
total.append(unit)
finally:
print("-"*30)
return total
def count(money):
b=0
for i in money:
b=b+i
return b
price=k()
pay=count(price)
print("消费的总金额"+str(pay)+"元")
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