Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Python 3 program that imports a CSV file and uses a sequential search to change the e-mail addresses in the CSV file for

Create a Python 3 program that imports a CSV file and uses a sequential search to change the e-mail addresses in the CSV file for all employees working in the MIS department. All employees have a TLD of .com currently, and all employees in the MIS Department need to have their TLD changed to .net. The program must use a sequential search and a for/while loop during search. Count the number of e-mail addresses that were changed. Load data into arrays before the search. The only import should be CSV. Use the following code sections when programming:

with open("C:/Users/le/csv/employees.csv") as csvfile:

file = csv.reader(csvfile)

for row in file:

ipaddress.append(record[0].split("."))

for i in range(0, len(ipaddress)):

print(ipaddress[i])

Example CSV File:

Paul,Roberts,555-912-5999,proberts@roadrunner.com,MIS,Tech Support Jason,Miller,555-241-1541,jmiller@roadrunner.com,Business,Accountant Megan,Doe,555-544-2222,mdoe@roadrunner.com,MIS,Helpdesk Michael,Johnson,555-681-8272,mjohnson@roadrunner.com,MIS,Tech Support Jean,Thompson,555-782-2851,jthompson@roadrunner.com,Business,HR

From the above example CSV file, Paul Roberts and Megan Doe would both need their e-mails changed to .net.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

b. Where did they come from?

Answered: 1 week ago

Question

c. What were the reasons for their move? Did they come voluntarily?

Answered: 1 week ago

Question

5. How do economic situations affect intergroup relations?

Answered: 1 week ago