Computer Networking: A Top-Down Approach (7th Edition)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
Bartleby Related Questions 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
Check Mark
Knowledge Booster
Background pattern image
Similar questions
    Recommended textbooks for you
    Text book image
    Computer Networking: A Top-Down Approach (7th Edi...
    Computer Engineering
    ISBN:9780133594140
    Author:James Kurose, Keith Ross
    Publisher:PEARSON
    Text book image
    Computer Organization and Design MIPS Edition, Fi...
    Computer Engineering
    ISBN:9780124077263
    Author:David A. Patterson, John L. Hennessy
    Publisher:Elsevier Science
    Text book image
    Network+ Guide to Networks (MindTap Course List)
    Computer Engineering
    ISBN:9781337569330
    Author:Jill West, Tamara Dean, Jean Andrews
    Publisher:Cengage Learning
    Text book image
    Concepts of Database Management
    Computer Engineering
    ISBN:9781337093422
    Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
    Publisher:Cengage Learning
    Text book image
    Prelude to Programming
    Computer Engineering
    ISBN:9780133750423
    Author:VENIT, Stewart
    Publisher:Pearson Education
    Text book image
    Sc Business Data Communications and Networking, T...
    Computer Engineering
    ISBN:9781119368830
    Author:FITZGERALD
    Publisher:WILEY