#三次登陆测试
count = 1
while count <= 3:
print('第%s次输入'%(count) )
name = input('请输入用户名:')
psw = input('请输入密码:')
if name == 'name1' and psw == "psw1":
print('登陆成功')
break
else:
print('登陆失败')
if count == 3:
break
count += 1
#三次登陆测试
count = 1
while count <= 3:
print('第%s次输入'%(count) )
name = input('请输入用户名:')
psw = input('请输入密码:')
if name == 'name1' and psw == "psw1":
print('登陆成功')
break
else:
print('登陆失败')
if count == 3:
break
count += 1