Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Create a script that asks the user for five email addresses and collects the domain names. Input Prompt the user five times to enter an

Create a script that asks the user for five email addresses and collects the domain names.

Input

Prompt the user five times to enter an email address. If the address does not include a "@" before a ".", it is not valid and does not count toward the five addresses.

Output

After each valid email, print just the domain name portion of the address without the extension. For example, "myname@yahoo.com" should output as "yahoo".

Once all five emails have been entered, all valid domain names should be printed again in one line, separated by spaces.

Example Program Run

This is an example of what the screen might look like after the program executes, including bold values that were input by the user.

 

Enter email address: someone@yahoo.com yahoo Enter email address: noone@wctc.edu wctc Enter email address: bad Invalid email address Enter email address: another@yahoo Invalid email address Enter email address: yet.another@msn.com msn Enter email address: myname@yahoo.com yahoo Enter email address: lastaddy@yahoo.com yahoo yahoo wctc msn yahoo yahoo

Step by Step Solution

There are 3 Steps involved in it

Step: 1

You can create a Python script to collect domain names from valid email addresses as described ... blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students explore these related Programming questions