Python Simple Login interface

Source: Internet
Author: User

From NumPy import*
classcount={}
lock_name=[]
passdate=[]
namedate=[]
Fr1=open (' User.txt ')
For line in Fr1.readlines ():
Linearr=line.strip (). Split ()
Namedate.append (linearr[0])
Passdate.append ( LINEARR[1])
Namedate=list (namedate)
Passdate=list (passdate)
M=shape (namedate) [0]
While 1:
fr2= Open (' Lock_name.txt ')
for line in Fr2.readlines ():
Lock_name.append (line)
N=shape (Lock_name) [0]
Username=input (' Username: ')
Password=input (' PassWord: ')
for I in Range (n):
If username==lock_name[i]:
Print (' This count is locked ')
break
for J in Range (m):
If USERNAME==NAMEDATE[J] and PASSWORD==PASSDATE[J]:
print (' welcome enter ')
Break
Else:
Classcount[username]=classcount.get (username,0) +1
If classcount[ USERNAME]>2:
Print (' This count is locked ')
FR2 = open (' Lock_name.txt ', ' W ')
Fr2.write (Username)
Fr2.close
Break
Else:
Print (' Please input again ')
Break

# # #流程图

---------Enter the user name and password first

--------compared to an already locked account

------------------------Y, the output account is locked.

------------------------N is the comparison between the user name and the password in the file

--------------------------------Y Output Welcome to enter

-------------------------------N to determine if the number of entries for the account is greater than 3 times

---------------------------------------------Y Lock the account and write the account to the lock file

---------------------------------------------N Please re-enter your account and password

Python Simple Login interface

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.