Question: In python, Problem 7: (2 pts) Write a program using selection and while statements to simulate the user login authentication process. Check the user's password
In python, Problem 7: (2 pts) Write a program using selection and while statements to simulate the user login authentication process. Check the user's password against a pre-set password of your choice, and grant or deny the user access based on the password entered. Give the user 3 tries for incorrect password entry. You must use the while loop for repetition. You should solve this problem without using the break statement. Test your program with at least 3 datasets/scenarios. Your program output screenshots, at a minimum, should show the behavior of your program for the following test cases : - if the user enter the correct password on the first try, - if the user enter the incorrect password 3 times - if the user enters the incorrect password on the first try but enter the correct password on the 2nd or 3rd try. You need to submit at least 3 output screenshots for this problem showing output for each of the test scenarios listed above. You may include test for other scenarios and include your screenshots. Trace the program execution using a state table/diagram and submit with your .docx file. Expected Output: Test case where user enters correct password on the first try: Enter password: Python Access granted! Test case where exhausts all tries unsuccessfully: Enter password: test Invalid password Enter password: 123 Invalid password Enter password: password Invalid password Access Denied Test case where the user enters the correct password on the 3rd try: Enter password: october Invalid password Enter password: Ptyhon Invalid password Enter password: Python Access granted!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
