b. [25] Your goal is to write functions that act on a dictionary containing the names...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
b. [25] Your goal is to write functions that act on a dictionary containing the names of students as keys, and their exam score as the values. An example dictionary is as follows: {'Kathy': 68, 'Mira': 94, 'Brian': 44, 'Fred': 90} i) A function Make Average () that takes such a dictionary as a parameter and returns the average score in the class. (You are NOT allowed to use any built-in functions that compute the average or sum of values) ii) A function FindStars () that takes such a dictionary as a parameter and returns a list containing students that scored 90 or higher iii) A function GradeBook () that takes such a dictionary as a parameter and returns another dictionary whose keys are the names of the students and the values are "EXCELLENT", "PASS", or "FAIL" determined as follows: FAIL if the exam score <50 PASS if the exam score >= 50 but <90 EXCELLENT if the exam score >= 90 b. [25] Your goal is to write functions that act on a dictionary containing the names of students as keys, and their exam score as the values. An example dictionary is as follows: {'Kathy': 68, 'Mira': 94, 'Brian': 44, 'Fred': 90} i) A function Make Average () that takes such a dictionary as a parameter and returns the average score in the class. (You are NOT allowed to use any built-in functions that compute the average or sum of values) ii) A function FindStars () that takes such a dictionary as a parameter and returns a list containing students that scored 90 or higher iii) A function GradeBook () that takes such a dictionary as a parameter and returns another dictionary whose keys are the names of the students and the values are "EXCELLENT", "PASS", or "FAIL" determined as follows: FAIL if the exam score <50 PASS if the exam score >= 50 but <90 EXCELLENT if the exam score >= 90
Expert Answer:
Answer rating: 100% (QA)
Required code for the python program is given below with explanatory comments Text format of code fo... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
class Queue using no other data structures than Item, Boolean, int and Stack. The amortized running time of each Queue meth od must be constant. (Note that you may only use the Stack as a black box:...
-
(a) Use the following text to derive distributions for rat and chased. Use a five-word window, including open- and closed- class words, ignore case, punctuation and sentence boundaries and weight...
-
Verify that the functions are probability density functions for a continuous random variable X over the given interval. Determine the specified probability. f(x) = xe over [0, ), P(1 X 3)
-
What is the impact on a partnership's balance sheet when (a) A partner withdraws by payment from partners' personal assets, and (b) A partner withdraws by payment from partnership assets?
-
Johnsons Inc. has two production departments, Cutting and Polishing, and two service departments, Electricity and Water. Electricity renders 30% of its services to Water, 40% to Cutting,...
-
Explain the term coffin corner.
-
Olthof Unlimited Company has determined that $2,500,100 of its total manufacturing overhead costs related to unit-level activities like electricity costs for running the manufacturing equipment and...
-
What was the existing capital structure for Apple inc? Do you believe it was optimum? Use Hamada's equation to determine the optimum. Should Apple take on more debt, repurchase stock, or have a...
-
Lilly K's has total assets of $726,030, et fixed assets of $556,740, long-term debt of $437.265, and total debt of $583,050. If inventory is $234,765. what is the current ratio?
-
You are the human resources director for IMF Plastics Manufacturing. Roan, the VPHR, has reached out asking for your help because the organization has experienced significant growth through an...
-
Traditionally, the activities of labor unions have supported the development of gains for the American worker. As labor unions negotiate with management, those gains set a standard for other...
-
Lisa is a supervisor working in Line CD-6 with 30 workers reporting to her. Her result-oriented and autocratic style has impressed her section ever since she joined the section. One Monday morning...
-
Why does change management matter? Why do most change efforts fail? For you alone, take a moment to reflect and then describe three (3) Leading and Managing Change Goals that you will strive to reach...
-
Discuss the types of intrinsic and extrinsic compensation that are used at your company or a company that you are interested in learning more about. Discuss how these components of compensation...
-
Suppose the point is on the curve sinx siny-c, where C is a constant. Use 3 4 the tangent line approximation to find the y-coordinate of the point on the curve with x- coordinate Be sure to show all...
-
On January 1, 2017, McIlroy, Inc., acquired a 60 percent interest in the common stock of Stinson, Inc., for $340,200. Stinson's book value on that date consisted of common stock of $100,000 and...
-
Write a loop that counts the number of alphanumeric characters (letters or digits) that appear in the string referenced by mystring.
-
Draw an IPO chart that documents the input, processing, and output of the built-in input function.
-
This is the first index in a string. a. 1 b. 1 c. 0 d. The size of the string minus one
-
Explain any four types of statistical analysis and their underlying statistical concepts. Describe how each of them has a unique role in the data analysis process.
-
Located in Tokyo, Japan, Sony Mobile Communications is a prominent competitor in the worldwide electronics equipment market. Because of stagnant sales in its ultra HD TVs, that division has decided...
-
Cory Rogers of CMG Research was happy to call Nick Thomas to inform him that Auto Concepts survey data were collected and ready for analysis. Of course, Cory had other marketing research projects and...
Study smarter with the SolutionInn App