Commit d8bc4eec by BellCodeEditor

save project

parent f5e85537
Showing with 4 additions and 23 deletions
def new_inpurt():
total = []
while True:
unit= input("请输入:")
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)
a=open(r'C:\Users\86130\Desktop\text.txt','w',encoding='utf-8')
a .write('星期六')
a.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