Commit b3d8777a by BellCodeEditor

auto save

parent 05e7d622
def z():
total = []
while True:
unit= input("请输入价格:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("错了")
else:
total.append(unit)
return total
def gytr(mo):
oiu=0
for i in mo:
oiu=oiu+i
return oiu
i=z()
p=gytr(i)
print(p)
\ No newline at end of file
file=open(r'C:\Users\EDY\Desktop\rf.txt',"w",encoding="Utf-8")
file.write('23456')
\ 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