Commit fe82c19d by BellCodeEditor

save project

parent 4c44d3da
Showing with 7 additions and 15 deletions
def total(): file1=open(r'C:\Users\lenovo\Desktop','w','encoding='utf-8'')
total = [] file1.write('小兰:12本\n')
while True: file1.write('小丽:11本\n')
unit= input("请输入:") file1.write('李文:9本\n')
if unit== 'q': file1.write('张伟:16本\n')
break file1.close()
else: \ No newline at end of file
total.append(unit)
print(total)
try:
unit=int(unit)
except:
print("请重新输入一个数字")
else:
total.append(unit)
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