Question: Exercise 7 . 2 - Extract domain name ( Python ) Define a function to extract the domain name from an email address. Domain name

Exercise 7.2- Extract domain name(Python)
Define a function to extract the domain name from an email address.
Domain name is the part after @ sign.
Write test code to ask user for an email and print out the domain name
Sample output:
Enter an email address( enter exit to quit) : john
Domain is: Domain not found
Enter an email address( enter exit to quit) : john.smith@missioncollege.edu
Domain is: missioncollege.edu
Enter an email address( enter exit to quit) : jane.smith@sjsu.edu
Domain is: sjsu.edu
Enter an email address( enter exit to quit) : exit
Exercise 7 . 2 - Extract domain name ( Python )

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!