Question: Write a function called is_valid_email(email_address) that validates an email address. 2. The email address to validate is: your.name@volstate.edu 3. Iterate over the string looking for

Write a function called is_valid_email(email_address) that validates an email address.

2. The email address to validate is: your.name@volstate.edu

3. Iterate over the string looking for the @ character.

4. Verify the string ends with: .edu

5. If both the @ character and .edu is found, then the email address is valid.

6. The function should return true if the email is valid. The function should return false if the email is invalid.

7. Call the is_valid_email function from your main code and print the result (true or false) returned by the function. Sample output (for a valid email address): true Sample output (for an invalid email address): false

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!