In Python, please Write a program that asks user to enter email address. Program then checks and prints whether email entered by the user is valid. Structure your program to have two functions:

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

In Python, please

  1. Write a program that asks user to enter email address. Program then checks and prints whether email entered by the user is valid. Structure your program to have two functions: 
  1. isEmailValid function that takes a string as parameter and returns True or False depending on whether the input string matches all the requirements of a valid email listed
  2. main function that repeatedly
    1. prompts the user for the email address,
    2. calls isEmailValid method passing the user entered string, saves the returned value
    3. reports whether the email is valid or not depending on the returned value.
    4. asks user if he/she wants to continue. If so, repeats above steps. Otherwise ends the program.
  3. Use the recommended strategy of calling the main function use "if __name__ ..." format.

    Email should be of the form first.last@bellevuecollege.edu. It should have

      • a '.'
      • a '@'
      • should end with "bellevuecollege.edu"
      • index of first '.' should be less than the index of '@'
      • there should be only one '.' before '@'
      • it should contain non-empty first and last names

     

    Hints:

    • Use find / in / endswith methods
    • Remember that isEmailValid method has the user input string as the only parameter and returns a boolean value of True or False.
    • If any one of the requirements is not met, it should return False. And should return True only if all the requirements are met. 
    • Clearly you will need to have many if conditions. Sequence them correctly.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 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