用户登陆(三次机会)
count = 0 while count < 3: user = input('请输入账号:') pwd = input('请输入密码:') if user == 'admin' and pwd == '123456': print("登陆成功") break else: print("账号或密码错误,请重新输入") count = count + 1
用户登陆(三次机会)
count = 0 while count < 3: user = input('请输入账号:') pwd = input('请输入密码:') if user == 'admin' and pwd == '123456': print("登陆成功") break else: print("账号或密码错误,请重新输入") count = count + 1