Suppose you are given a list of marks, please write a function filter_mark(marks, grade) that takes...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Related Book For
Introductory Econometrics A Modern Approach
ISBN: 978-0324660548
4th edition
Authors: Jeffrey M. Wooldridge
Posted Date:
Students also viewed these programming questions
-
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...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
"""A BARD DAY'S NIGHTa.k.a. BARD ROCK CAFEa.k.a. THE SCHOOL OF BARD KNOCKSa.k.a. A BARD RAIN'S A-GONNA FALL""" # Imports from typing import Optional, TextIO, Dict, Set, List,Tuple # Specific...
-
2. National Defense (40 points). There are 11 countries in Europe who get utility from general consumption c, and from European national defense G. The utility of a generic country i is u(ci, G) =...
-
Expected Return, Dividends, and Taxes the gecko Company and the Gordon Company are two firms whose business risk is the same but that have different dividend policies. Gecko pays no dividend, whereas...
-
What makes a real option valuable?
-
The 2014 financial statements of LVMH Moet Hennessey-Louis Vuitton S.A. are presented in Appendix C of this book. LVMH is a Paris-based holding company and one of the worlds largest and best-known...
-
Suppose that the aggregate expenditure curve can be expressed algebraically as AE = 3,000 2,000r, Where AE is aggregate expenditures and r is the real interest rate expressed as a decimal. You check...
-
Once managers have measured actual performance, they should Question 4 5 options: revise accepted standards. compare actual performance to the standards. establish the standards of performance....
-
Table, from a General Social Survey, relates responses on R = religious service attendance (1 = at most a few times a year, 2 = at least several times a year), P = political views (1 = liberal, 2 =...
-
Kroger has annual sales in excess of $100 billion and operates stores across the United States under various names, including Kroger's, Ralph's, and Harris Teeter. In surveys, Kroger's customers have...
-
The Segal Company makes and sells a single product called a Wib. The budgeted sales for November are P165, 000. The gross margin is budgeted at 40% of sales pesos. If the net operating income for...
-
The capital structure of a company during the whole of this current financial year has been as follows: Ordinary Shares $1 fully paid - market value $800,000 6% debentures ($100 par value) $212,000...
-
Cullumber Company is considering purchasing new equipment for $452,400. It is expected that the equipment will produce net annual cash flows of $58,000 over its 10-year useful life. Annual...
-
You are purchasing call options. You have gathered the following information: Number of options purchased 1,100 Strike Price of Option $35.84 Option Price $5.04 Share Market Price $37.52 Required...
-
If the TP overpays her 2023 Federal tax liability by $5,200, but wants to apply $3,000 of the overpayment to her 2024 estimated Federal income tax liability, then she should enter $3,000 on:
-
As the saying goes, "money makes the world go round", and this is very true in the world of consulting. When deciding on becoming a consultant, what financial aspects should you take into...
-
Horse serum containing specific antibody to snake venom has been a successful approach to treating snakebite in humans. How do you think this anti-venom could be generated? What are some advantages...
-
In the example in equation (7.29), suppose that we define outlf to be one if the woman is out of the labor force, and zero otherwise. (i) If we regress outlf on all of the independent variables in...
-
The data set BWGHT.RAW contains data on births to women in the United States. Two variables of interest are the dependent variable, infant birth weight in ounces (bwght), and an explanatory...
-
Use the data in TRAFFIC2.RAW for this exercise. Computer Exercise C10.11 previously asked for an analysis of these data. (i) Compute the first order autocorrelation coefficient for the variable...
-
Use the working papers and data from On Your Own 15-2. Forms for completing this On Your Own are provided in the Working Papers. Work independently to complete this problem. 1. Assume Cheries Pizza...
-
Milford Pump Company's income statement has been prepared for November of the current year. Instructions: 1. Prepare Milford Pump Companys November income statement reporting contribution margin. 2....
-
Dennis Williams is projecting the coming years net income potential for Williams Paint. The paint is sold for \($15.00\) a gallon. Variable costs per gallon are \($10.00\), and annual fixed costs are...
Study smarter with the SolutionInn App