Question: Question 3 - Map - Reduce ( 2 marks ) Create a Python program that uses Map - Reduce to analyze a data set. You
Question MapReduce marks
Create a Python program that uses MapReduce to analyze a data set. You must use map, filter, and reduce functions. Details:
Put a comment at the top of the question Python codeblock with your name and student number.
Use a data set that consists of the numbers from to
Apply a map function to the data set that will divide the value by if it is even or multiply by if it is odd. Print the result after the map function is applied. marks
Apply a filter function that will keep the value if it is between and inclusive. Print the result after the filter function is applied. mark
Apply a reduce function that will miltiply the two values if the first value is greater than the second otherwise it will add them. Print the result after reduce function is applied. mark
Sample Output
Resultaftermap:
Resultafterfilter:
Resultafterreduce:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
