Question
PYTHON PROGRAMMING. Using comments. Thank you Create a program which will have the user must enter a password in order to see a secret message.
PYTHON PROGRAMMING. Using comments. Thank you
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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started