Question: Purpose: Gaining technical skills using Python Directions: Scenario: Generate a random string of 6 digits for 2-Factor Authentication (2FA)Links to an external site. using a
Purpose:
Gaining technical skills using Python
Directions:
Scenario: Generate a random string of 6 digits for 2-Factor Authentication (2FA)Links to an external site. using a one-time password (OTP). Print this string (typically this would be emailed or sent through text to the user but we'll not worry about this step as this is an intro class). The user should type in the printed string and if correct an "Access is granted!" message is displayed. Otherwise, the user should be re-prompted. If they incorrectly enter for the same random string 3 times, a new string should be generated for them to try for 3 times. If at any point they want to end, they can type the word "quit". Upon quitting the program, the program should say, "Program Terminated."
Create the python program that solves the problem in the scenario. Make sure to format it as seen in the screenshot below. Formatting means the prompts for the user should be spelled and written the same way as seen in the screenshot as well as the spacing between outputs (single-spaced, double-spaced, etc.) should also match. Make sure variable values are formatted the same way as seen in the screenshot.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
