Python_1_用户密码登录

来源:互联网 发布:剑网三军太捏脸数据 编辑:程序博客网 时间:2024/06/14 10:47

while true:

name=raw_input("please input your name:")

if name=="lk":

 for i in range(3):

 pwd=raw_input("please input your password:")

 if pwd=="123456":

   print "welcome %s" % name

   break

  elif i==2:

    print("密码已锁定")

 else:

         print("密码错误")

 break

else:

print "Sorry, %s is not exist" % name

break

sys.exit()

print




原创粉丝点击