
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
write a simple python script for an email checker
please provide an explanation of how it functions
I've attached the example I'm trying to achieve
- 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 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.

Transcribed Image Text:*Python 3.6.3 Shell*
File Edit Shell Debug Options Window Help
>>>
====== RESTART: C:/code/Python/Playground/strings/email.py
==
Enter the email address: t.h@bellevuecollege.edu
Valid email
Want to continue (y/n) ? y
Enter the email address: t.h
Invalid email
Want to continue (y/n) ? y
Enter the email address: tebellevuecollege.edu
Invalid email
Want to continue (y/n) ? y
Enter the email address: t.h@belle.edu
Invalid email
Ln: 75 Col: 4
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 nowThis is a popular solution!
Step by stepSolved in 2 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Code is in C++ Instructions Write a program that reads in a line consisting of a student’s name, Social Security number, user ID, and password. The program outputs the string in which all the digits of the Social Security number and all the characters in the password are replaced by x. (The Social Security number is in the form 000-00-0000, and the user ID and the password do not contain any spaces.) Your program should not use the operator [] to access a string element. Input is as follows highlighted in bold John Doe 333224444 DoeJ 123Password My problem is with my output, i am close with the code, but i have attached what happens on my output and i cannot figure out why? You can see how it prints out multiple times but i am lost? The terminal image is also attached. Thank you! Here is the code: #include <iostream> //include statement(s)#include <iomanip>#include <string> using namespace std; //using namespace statement(s) void getInfo(string info); //void…arrow_forwardIn this assignment you will be responsible for writing several string validation and manipulationfunctions. The assumption will be that you are writing functions that will take input from a form andmanipulate or validate the information entered before it is processed into a database. A database is acollection of information but the information in the database must always be entered in a specificformat. Your responsibility will be to take data entered into a program and be sure it is writtencorrectly before it is entered into the database.Each function will have to have a specific name and heading. Each function will also need to includea docstring, the correct logic, and the proper return. Each function will be given a specific set ofpreconditions and postconditions/returns. A precondition is something you may assume to be truewhen the function is executed. A post condition is something you need to be sure is completed whenthe function is executed. Be sure to test each one of your…arrow_forwardUSING ARROW FUNCTIONS IN JAVASCRIPT WRITE THE FOLLOWING CODEarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education