Commit ee1f13dd by BellCodeEditor

save project

parent ef0fd39f
Showing with 7 additions and 24 deletions
lik12 = open('C:\\Users\\makcoo\\Desktop\\text.txt','w',encoding = 'utf-8')
lik12.write('今天/n')
lik12.close()
# lik12 = open('C:\\Users\\makcoo\\Desktop\\text.txt','a',encoding = 'utf-8')
# lik12.write('明天')
# lik12.close()
def new4r6():
total = []
while True:
unit= input("请输入:")
if unit== 'd':
break
else:
try:
unit = int(unit)
except:
print("输入数字!")
else:
total.append(unit)
return total
w = new4r6()
def ase(c):
waa = 0
for i in c:
waa = waa+i
return waa
f = ase(w)
print(f)
\ 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