摘要: user = "jack"password = 123count = 0def write_lock_list(name): #将输入的用户名写入文件当中 file = open('lock_list','w') file.writelines(name) file.close()def read_ 阅读全文
posted @ 2018-10-25 17:32 阿富汗 阅读(185) 评论(0) 推荐(0) 编辑
摘要: #若输入年龄正确,完成循环,最多只能输入三次,停止本次循环(使用while循环)age = 28count = 0while count<3: _age = int(input("age:")) if _age==age: print("you got it!") break elif _age>a 阅读全文
posted @ 2018-10-25 11:55 阿富汗 阅读(224) 评论(0) 推荐(0) 编辑