Write a function grade_stats that accepts as a parameter a list representing the grades given in...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a function grade_stats that accepts as a parameter a list representing the grades given in a course and returns a dictionary mapping each grade to the count of how many were given. For example, if a list grades contains the following: ['A', 'I', 'C', 'C', 'E', 'B', 'A', 'E', 'E', 'A', 'B', 'B', 'B'] The call of grade_stats (grades) should return the following dictionary: {'A':3, 'I': 1, 'C':2, 'E':3, 'B':4} Note that the grades may not always be A, B, C, D, E and I. For example, A- is a valid grade some places as is 3.7. You should treat whatever is in the passed in list as a valid grade. If the passed in list is empty, your function should return an empty dictionary. Write a function grade_stats that accepts as a parameter a list representing the grades given in a course and returns a dictionary mapping each grade to the count of how many were given. For example, if a list grades contains the following: ['A', 'I', 'C', 'C', 'E', 'B', 'A', 'E', 'E', 'A', 'B', 'B', 'B'] The call of grade_stats (grades) should return the following dictionary: {'A':3, 'I': 1, 'C':2, 'E':3, 'B':4} Note that the grades may not always be A, B, C, D, E and I. For example, A- is a valid grade some places as is 3.7. You should treat whatever is in the passed in list as a valid grade. If the passed in list is empty, your function should return an empty dictionary.
Expert Answer:
Answer rating: 100% (QA)
The detailed answer for the above question is provided below Sorting S... View the full answer
Related Book For
Accounting Principles Part 3
ISBN: 978-1118306802
6th Canadian edition Volume 1
Authors: Jerry J. Weygandt, Donald E. Kieso, Paul D. Kimmel, Barbara Trenholm, Valerie Kinnear, Joan E. Barlow
Posted Date:
Students also viewed these programming questions
-
Write a function named wordStatsPlus that accepts as its parameter a string holding a file name, opens that file and reads its contents as a sequence of words, and produces a particular group of...
-
Write a method called pigLatin that accepts as a parameter a Scanner representing an input file. Your method should, preserving line breaks, print out the input files text in a simplified version of...
-
Write a method called area that accepts as a parameter the radius of a circle and that returns the area of the circle. For example, the call area(2.0) should return 12.566370614359172. Recall that...
-
Describe, draw, the curve with the following parametric equations in the cylindrical co-ordinate space: r = 5, z = 2,0 = t
-
1. m = 79.0 g, T = 16C, Q = _______ cal 2. m = 750 kg, T = 125C, Q = _______ J 3. m = 1250 g, T = 50.0C, Q = _______ J 4. m = 850 g, T = 115C, Q = _______ kcal 5. m = 800 g, T = 80.0C, Q = _______...
-
Write down expressions for Ksp for the following ionic salts: (a) AgCl; (b) CaCO 3 ; (c) CaF 2 .
-
Grammer Chicken produces canned chicken a la king. The chicken a la king passes through three departments: (1) Mixing, (2) Retort (sterilization), and (3) Packing. In the Mixing Department, chicken...
-
1. Develop forecasts using regressions of sales on each of the series of rain forecasts respectively. Calculate the MFE (bias), MAD, and MAPE for the two forecasting models. Which rain forecast seems...
-
A ( n ) _ _ _ _ _ _ _ _ _ _ contains information about a given person, product, or event. Attribute Column Field Record
-
A solvent-recovery plant consists of a plate-column absorber and a plate-column stripper. Ninety percent of the benzene (B) in the gas stream is recovered in the absorption column. Concentration of...
-
5 . Ms . Kathleen Boyd, director of logistics for the Scenic Calendar Company, wishes to evaluate two methods of time series forecasting. She has collected quarterly calendar sales data from the...
-
A retrocession is a kickback that asset managers may be skimming off investments. While little known in the US, the practice has been an open secret in European private banking for decadesand it...
-
TANG YINGHONG WAS CAUGHT IN AN IMPOSSIBLE squeeze. For years, his employer, Ningbo Beifa Group, had prospered as a top supplier of pens, mechanical pencils, and highlighters to Wal-Mart Stores and...
-
On Mar. 2, [2009], Wayzata (Minn.)- based TCF Financial announced it would return $361 million to the Treasury Dept. TCFs decision came weeks after politicians pilloried the bank for holding a...
-
In this dawn of geo-tracking, many people are more likely to start out swapping data with friends and families. Already 25 million people have installed Facebook on their handsets. And Google is...
-
Using company resources to work on personal projects, especially on company time, is a no-no for employees in most organizations. But supervisors often operate in what I call a gray zone, turning a...
-
The points I(-3, 6), J(-9,0), K(-6, -3), and L(0, 3) form quadrilateral IJKL. Plot the points then click the "Graph Quadrilateral" button. Click on the graph to plot a point. Click a point to delete...
-
As water moves through the hydrologic cycle, water quality changes are common because of natural phenomena or anthropogenic pollution. Using Figure 11.1, describe how water-quality changes occur...
-
On January 1, 2012, Chilton Ltd. issued $500,000, 5%, five-year bonds. The bonds were issued to yield a market interest rate of 6%. Chilton's year end is December 31. On January 1, 2014 immediately...
-
Three different lease transactions are presented below for Manitoba Enterprises, a public company. Assume that all lease transactions start on January 1, 2014. Manitoba does not receive title to the...
-
For each of the following situations, indicate if it is an example of applying the cost constraint correctly. (Write Yes or No beside each item.) (a) ________The company corrects its financial...
-
What does the Richter scale measure?
-
Where do earthquakes occur?
-
Climates farther from the equator usually have (a) lower average temperatures. (b) higher solar intensity. (c) more precipitation. (d) more water.
Study smarter with the SolutionInn App