The first week of homework, simulated login

---Restore content begins---

Simulation login job requirements:

1. The user enters the account and password to log in

2. User information is stored in the file

3. The user is locked after entering the wrong password three times

 

Ideas:

1. Use the tex file to store the user name and password information, and the stored format is stored in the dictionary format; use the tex file to store the locked user name information, and the stored format is stored in the list format;

2. When running the program, first enter the user name and password, and convert the user name and password in the file into the corresponding data format for data storage;

3. Determine whether the entered user name exists. If it does not exist, it will prompt "User does not exist", and then judge the user if it exists;

4. Determine whether the user is among the locked users. If it is, it will prompt "The user is locked". If it is not, the password will be judged;

5. Enter the password correctly, and it will prompt "User login successfully". You can enter it again if you enter the wrong password three times or less. If you enter the wrong password three times, the user will be locked, and the user information will be written into the "Locked User Information" file;

Readme:

1. Execute the program, enter the user name and password

2. The username and password are correct, and you can log in normally

3. If the username is incorrect or locked, the login fails

4. Enter the wrong password three times, lock the user

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324890240&siteId=291194637