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:
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...
Related questions
Question
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:
- 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
- main function that repeatedly
- prompts the user for the email address,
- calls isEmailValid method passing the user entered string, saves the returned value
- reports whether the email is valid or not depending on the returned value.
- asks user if he/she wants to continue. If so, repeats above steps. Otherwise ends the program.
- 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
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
Recommended textbooks for you
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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
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
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY