Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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]

image text in transcribed

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

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

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

4. Who should be invited to attend?

Answered: 1 week ago

Question

7. How will you encourage her to report back on the findings?

Answered: 1 week ago