python-登陆接口

# -*- coding:utf-8 -*-
# Author:DliYao

#编写登陆接品
#输入用户名密码
#认证成功后显示欢迎信息

username = "dengliyao"
password = "dly123"
count = 0
while count < 3:
new_username = input("请输入用户名:")
new_password = input("请输入密码:")
if new_username == username and new_password == password:
print("登陆成功")
break
else:
print("用户名或密码错误")
count +=1
else:
print("输入错误次数过多")
posted @ 2019-04-14 16:23  dengliyao  阅读(207)  评论(0编辑  收藏  举报