Question: Solve in python Q3: Filter a list (20 marks) Suppose you are given a list of marks, please write a function filter_mark(marks, grade) that takes

Solve in python
Q3: Filter a list (20 marks) Suppose you are given a list
of marks, please write a function filter_mark(marks, grade) that takes a list
of marks as input and return a list contianing only the marks
of the specified grade. For example, filter_mark ([30, 20, 60, 78], 'F')

Q3: Filter a list (20 marks) Suppose you are given a list of marks, please write a function filter_mark(marks, grade) that takes a list of marks as input and return a list contianing only the marks of the specified grade. For example, filter_mark ([30, 20, 60, 78], 'F') should return [30, 20]. Because only 30 and 20 are F grades. def filter_mark (li, grade): # INSERT YOUR CODE BELOW #**** #EXAMPLE TESTING CASES # DO NOT CHANGE filter_mark([10, 20, 30, 40], 'F') # return [10, 20, 30, 40] filter_mark ([33, 28, 89, 85, 50], "HD') # return [89, 85] wwwww

Step by Step Solution

3.34 Rating (157 Votes )

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