Commit d8bc4eec by BellCodeEditor

save project

parent f5e85537
Showing with 4 additions and 23 deletions
def new_inpurt(): a=open(r'C:\Users\86130\Desktop\text.txt','w',encoding='utf-8')
total = [] a .write('星期六')
while True: a.close()
unit= input("请输入:") \ No newline at end of file
if unit== "q":
break
else:
try:
unit = int(unit)
except:
print("请输入整数!")
else:
total.append(unit)
print(total)
return total
a=new_inpurt()
def ab (c):
d = 0
for i in c:
d=d+i
return d
f = ab(a)
print(f)
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