#!/usr/bin/env python
# -*- coding:utf-8 -*-
i = 0
while i< 3:
name = raw_input("用户名:")
pwd = raw_input("密码:")
if name =="刘仕民"and pwd =="123":
print("登陆成功")
break
elif i == 0:
print("你还有2次输入机会")
elif i == 1:
print("你还有1次输入机会")
elif i == 2:
print(" 登陆失败 ")
print("你还有0次输入机会")
i += 1
时间: 2024-10-13 21:01:52