Question: Please post python code screen shot Problem Statement: The purpose of this lab assignment is to gain experience in python's Exception handling. In this assignment,

Please post python code screen shot

Please post python code screen shot Problem Statement: The purpose of this

lab assignment is to gain experience in python's Exception handling. In this

Problem Statement: The purpose of this lab assignment is to gain experience in python's Exception handling. In this assignment, you will write a program for password validation system. Problem Design: Password Validation 1. The program will take password from user and check if it contains the following: a. Password must contain at least one letter b. Password must contain at least one digit c. Length must be between 6 to 12 characters. d. It may or may not contain any other characters like any special symbols. There is no restriction on that. 2. Helper functions to check if a password has at least one letter and at least one digit are provided. Docstring are also given in the template file. These functions return True if condition satisfies (has at least one digit/letter) otherwise returns False. 3. Your task: Design a base class (Invalid Password) and three child exception classes (InsufficientLength, NoDigit, NoLetter) to raise the exception when the conditions are not met. 4. Design a simple user menu to ask for the password as long as the user does not enter a valid password. 5. The menu should also make a try-except block to call for appropriate Exception class as needed. If none of the exception occurs the program will print a message as shown in sample 1/0. 6. A sample problem can be found in Exception video lecture use case on designing a number guessing game. You can follow the same program structure. Sample 1/0: Enter your password: 123 Password length needs to be between 6 to 12 Enter your password: aAAAAAAA Password must contain one digit (0-9) Enter your password: 1234567890 Password must contain one letter Enter your password: 123aaaAA@ Valid password: 123aaaAA@ #helper functions def has digit (password) : Checks if a password string has at least one digit. Returns True if at least one digit is present, False otherwise return any ([char.isdigit() for char in password] ) def has letter (password) : Checks if a password string has at least one letter. Returns True if at least one letter is present, False otherwise return any ([(ord (c)>= 97 and ord (c) = 65 and ord (c)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!