a python program that does the following Write a function, load_data, that reads the data file (acme_customers.csv) into
Posted: Fri May 20, 2022 11:58 am
a python program that does the following
Write a function, load_data, that reads the data file
(acme_customers.csv) into a dictionary. The customer’s name (first
and last name) should be set as the key for each dictionary item.
The value for each dictionary item should be a list containing
details about acustomer (company_name, address, city, county,
state, zip, phone1, phone2, email, web). The function will return
the dictionary When the program begins, the user will be presented
with a menu: Main Menu 1. Search for customers by last name 2. Find
and display all customers in a specific zip code 3. Remove/Delete
customers from the dictionary 4. Find all customers with phone1 in
specific area code 5. Display all customers (First and last names
only) 6. Exit Please enter your selection: If the user selects
option 1 Prompt the user to enter a last name Write a function,
find_customers, that takes a name (last name) as a parameter. The
function will search the dictionary for customers with the last
name. If matches are found, display the customers’ details, or else
display a message: No customer with the last name was found
Write a function, load_data, that reads the data file
(acme_customers.csv) into a dictionary. The customer’s name (first
and last name) should be set as the key for each dictionary item.
The value for each dictionary item should be a list containing
details about acustomer (company_name, address, city, county,
state, zip, phone1, phone2, email, web). The function will return
the dictionary When the program begins, the user will be presented
with a menu: Main Menu 1. Search for customers by last name 2. Find
and display all customers in a specific zip code 3. Remove/Delete
customers from the dictionary 4. Find all customers with phone1 in
specific area code 5. Display all customers (First and last names
only) 6. Exit Please enter your selection: If the user selects
option 1 Prompt the user to enter a last name Write a function,
find_customers, that takes a name (last name) as a parameter. The
function will search the dictionary for customers with the last
name. If matches are found, display the customers’ details, or else
display a message: No customer with the last name was found