编写登陆接口 1输入用户密码 2可依认证成功后显示欢迎信息 3输错三次后锁定

 

# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""
true_name = "yin"
true_password = "j123"

num=0
while num<3:
    num=num+1
    your_name = input("yourname:")
    your_password = input("yourpassword:")
    if (true_name == your_name) and (true_password == your_password):
        print("hello")
        break
    if num == 3:
        print("account is locked!")
    

你可能感兴趣的:(编写登陆接口 1输入用户密码 2可依认证成功后显示欢迎信息 3输错三次后锁定)