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...



  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 [email protected]. 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.





Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here