常青树 发表于 2018-8-14 07:10:05

Python学习作业之登陆接口_While

# Author:Bryce_Zhang  
username = '1'
  
password = '2'
  
count = 0
  
while count <4:
  
    users = input("users:")
  
    pass1 = input("pass:")
  
    ifusers == username and pass1 == password:
  
      print("登陆成功......")
  
      break
  
    else:
  
      if count ==3:
  
            print("您的账户已锁定!")
  
            break
  
      count +=1
页: [1]
查看完整版本: Python学习作业之登陆接口_While