Instance2:login interface(还有问题)

Posted deakin-du

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Instance2:login interface(还有问题)相关的知识,希望对你有一定的参考价值。

#模拟登陆:
#1. 用户输入帐号密码进行登陆
#2. 用户信息保存在文件内
#. 用户密码输入错误三次后锁定用户
f_lock=open("lock_list",‘r+‘,encoding="utf-8")
f_account=open("account",‘r‘,encoding="utf-8")

while True:
for lockline in f_lock:
lockline=lockline.strip(‘\n‘)
account = input("ple key in your account name:")
if account==lockline: #无法判断第二行的内容
print("your account has been locked, pls contact the system administrator")
exit()
else:
for accountline in f_account:
(user,passwd)=accountline.strip(‘\n‘).split()
if account==user:
count=0
while count<3:
password=input("pls key in your password:")
if password==passwd:
print("welcome to login,%s"%(account))
break
else:
print("your password is not correct,pls try again,remain %s times"%(2-count))
count+=1
else:
f_lock.write(account + ‘\n‘)
print("your account has been locked,pls contact your system administrator")
exit()
else:
            print("account do not existed.")

以上是关于Instance2:login interface(还有问题)的主要内容,如果未能解决你的问题,请参考以下文章

Android proguard 预期 [!]interface|@interface|class|enum

将 map[interface ]interface 转换为 map[string]string

Java abstract interface与 interface的区别

interface与class

ts中interface和type的区别

go语言之行--接口(interface)反射(reflect)详解