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 .edu email address validation system. Problem Design: The program will take an email address from user and check if it contains the following: a. Address must contain at least an ‘@’ symbol b. Address must contain at least a ‘.edu’ suffix c. Length must contain at least 12 characters. d. Address must contain at least one digit 2. Helper functions to check if an address has at least one digit is provided. Docstring are also given in the template file. This function returns True if condition satisfies otherwise returns False. 3. Your task: Design a base class (Invalid Address) and child exception classes (InsufficientLength, NoDigit, NoEdu, NoAtSymbol ) to raise the exception when the conditions are not met. 4. Design a simple user menu to ask for the address as long as the user does not enter a valid address. 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 I/O. 6. Hint: A sample problem structure can be found in Exceptionslecture: designing a number guessing game. Sample I/O: Enter your email address: ih@gmu.edu Address must have at least 12 characters Enter your email address: janedough@gmu.edu Address must contain at least one digits (0-9) Enter your email address: janedough22gmu.edu Address must contain one @ Enter your email address: janedough22@gmu.com Address must contain .edu suffix Enter your email address: janedough22@gmu.edu Valid address: janedough22@gmu.edu

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

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 .edu email address validation system.


Problem Design: The program will take an email address from user and check if it contains the
following:
a. Address must contain at least an ‘@’ symbol
b. Address must contain at least a ‘.edu’ suffix
c. Length must contain at least 12 characters.
d. Address must contain at least one digit


2. Helper functions to check if an address has at least one digit is provided. Docstring are
also given in the template file. This function returns True if condition satisfies otherwise
returns False.


3. Your task: Design a base class (Invalid Address) and child exception classes
(InsufficientLength, NoDigit, NoEdu, NoAtSymbol ) to raise the exception when the
conditions are not met.


4. Design a simple user menu to ask for the address as long as the user does not enter a valid
address.


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 I/O.


6. Hint: A sample problem structure can be found in Exceptionslecture: designing a number
guessing game.


Sample I/O:
Enter your email address: ih@gmu.edu
Address must have at least 12 characters
Enter your email address: janedough@gmu.edu
Address must contain at least one digits (0-9)
Enter your email address: janedough22gmu.edu
Address must contain one @
Enter your email address: janedough22@gmu.com
Address must contain .edu suffix
Enter your email address: janedough22@gmu.edu
Valid address: janedough22@gmu.edu

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY