So i am currently creating a quiz program which requires a really basic authentication. This is the psuedocode that i have.
Start
Open UserCredentials.txt (This is where the user ID is stored)
Get UserID
If UserID is in UserCredetials.txt( This is the part that i could not figure out how to do)
..Passtries = 0
..While passtries != 1
....Get password
....If password is UserCredentials.txt( The other part which i couldnt do.)
......Passtries = 1 (Correct password, it will exit the loop)
....else
......Passtries = 0 (wrong password, it will continue looping)
....WhileEnd
So the problem here is that i could not figure out how to check the UserCredentials.txt file based on what the user has inputted and write the code for it in python. (Python 2.7.11)
Note that in the UserCredentials.txt, the userID and password are stored side by side [Izzaz abc123]
Also i am still kind off new to python, so go easy on me :)
Any help is appreciated.