Commit 5fc4e86a by BellCodeEditor

auto save

parent e728c6a5
......@@ -20,8 +20,8 @@ def sum(ji):
count=count+i
return count
# result=new_input()
# print(result[0])
result=new_input()
print(result[0])
price=new_input()
pay=sum(price)
print("你一共消费了"+str(pay)+"现金还是扫码")
......
def sum(money):
count=0
for i in money
count=count+1
return count
import func
data=func.new_input()
score=func.sum(data)
print("这位选手的分数为"+str(score))
\ No newline at end of file
import func
x=func.new_input()
\ No newline at end of file
total = []
while True:
def new_input():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("请输入一个数字")
else:
total.append(unit)
print(total)
\ No newline at end of file
finally:
print("_"*30)
return total
def sum(ji):
count=0
for i in ji:
count=count+i
return count
result=new_input()
# print(result[0])
price=new_input()
pay=sum(price)
# print("你一共消费了"+str(pay)+"现金还是扫码")
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