Commit 59eb9991 by BellCodeEditor

auto save

parent 578e41ee
import func
data=new_ input
print("这位选手的总分数为"+str(总得分))
\ No newline at end of file
total = [] def agr():
while True: total = []
unit= input("请输入:") while True:
if unit== 'q': unit= input("请输入:")
break if unit== 'q':
else: break
total.append(unit) else:
print(total) try:
\ No newline at end of file unit =int(unit)
except:
print("请输入一个数字")
else:
total.append (unit)
print("*"*30)
return total
def sum(money):
count =0
for i in money:
count =count +1
return count
总价=agr()
pay=sum(总价)
print("你一共消费了"+str(pay)+"元!微信还是支付宝?")
\ 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