PYTHON PROGRAMMING. Using comments.
Create a program which will have the user must enter a password in order to see a secret message.
We will give the user 5 chances to get the password right, and either print the secret message or a failure message after 5 chances.
The program will being by taking one string. It will hash the string using the built - in Python function hash
At the top of the file, define a variable final_pass to be the result . Now, write the rest of the program.
Each time you ask the user for the password, ask for the user's input, calculate the key and compare the value to final_pass.
If the two match, the user most likely entered the correct password, otherwise he loses one chance.