Question
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
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
There are 3 Steps involved in it
Step: 1
The detailed answer fo...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Introductory Econometrics A Modern Approach
Authors: Jeffrey M. Wooldridge
4th edition
978-0324581621, 324581629, 324660545, 978-0324660548
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App