Commit 9ff7c81e by BellCodeEditor

auto save

parent 0595e6aa
Showing with 4 additions and 38 deletions
def new_input():
mbjg=[]
while True:
lkoj=input("请输入")
if lkoj=="q":
break
else:
try:
lkoj=int(lkoj)
except:
print("请输入一个整数")
else:
mbjg.append(lkoj)
print("_"*30)
return mbjg
def sum(money):
kkk = 0
for i in money:
kkk=kkk+i
return kkk
# cfsd = new_input()
# pay = sum(cfsd)
#print("你一共消费" + str(pay)+"元扫码还是现金呢?")
import func
cfsd = func.new_input()
pay = func.sum(cfsd)
print("这位选手你的分数是" + str(pay)+"分")
file1=open(r'd:\test.txt','w',encoding='utf-8')
file1.write("小兰:12本")
file1.close()
\ 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