Question: Part I - Functions Write a program to do the following: . Create two separate lists: [Female, M, 1, 4, Mail, 0, F] o [-23,1,35,52,23,0,1000]

 Part I - Functions Write a program to do the following:

Part I - Functions Write a program to do the following: . Create two separate lists: ["Female", "M", 1, 4, "Mail", 0, "F"] o [-23,1,35,52,23,0,1000] For each element in the first list, replace each element using the following rules: o Change the value to Female if the element is Female, F, or 1 o Change the value to Male if the element is Male, M, or 0 o Otherwise, change it to "Undefined" For each number in the second list, replace each element using the following rules: 0 Numbers between 0 and 20 (inclusive), change element to "Low" Numbers over 20 but less than or equal to 40, change element to "Medium" Numbers over 40 but less than or equal to 60, change element to "High" o Anything else, change element to "Out of range" Use two separate functions to clean these lists and print the results when you are finished. Use meaningful variables and comment your header with your name, date, and a short program description. Save the program as a *py file and copy and paste the output into a *.txt file and upload the files to

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 Databases Questions!