1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
AlexFokin [52]
3 years ago
8

Calculate maximum average Suppose we have a small student dictionary. The dictionary contains the name of each student as key an

d value is a list of their score for three courses. Sample dictionary is provided in the template file. student_dict
Computers and Technology
1 answer:
7nadin3 [17]3 years ago
3 0

Answer:

from functools import reduce

from collections import Counter

def cal_max_avg( mydict ):

    new_item = [ ]

   for items in mydict.items():

       reducer = reduce(lambda x,y: x + y, items[1])/3

       new_item.append((items[0], reducer))

   newdict = Counter(dict(new_item))

   return newdict.most_common(1)

diction = {'john': [45,54,56], 'yolanda':[98,78,87], 'Joshua':[67,78,87]}

result = cal_max_avg( diction )

Explanation:

The python function accepts a dictionary and returns a tuple of the key from the input dictionary with the maximum average score for the students.

You might be interested in
Which are valid double statements for java? double a = 0; double b = -1.0; double c = -425; double d = 6340; double e = -1.0; do
NemiM [27]

Answer: 5

Explanation:5

7 0
3 years ago
Read 2 more answers
Define file organization
galben [10]

To organize all files in the appropriate folders for easy and quick access

4 0
2 years ago
Read 2 more answers
The ________________ command ends the current command session
Lemur [1.5K]

Answer:

exit

Explanation:

When the Command Prompt window is active, you can end a Command Prompt session in any of the following ways: Type exit at the command prompt. Click the Close button. Click the Control menu icon, and choose Close.

5 0
4 years ago
Read 2 more answers
Select the correct answer.
jenyasd209 [6]
I think it is D
Hope my answer help you?
5 0
3 years ago
Whats in a computer?
kenny6666 [7]
A lot of things are in a computer there a motherboard, A cpu, A hard drive etc. A motherboard is the computer system  bascilly its the heart for a computer. The cpu is the the brain of a computer it controls on your computer and keeps it going good. finally a hard rive is the memory of your computer it stores all the data including files, photos, etc
8 0
3 years ago
Read 2 more answers
Other questions:
  • If the object instance is created in a user program, then the object instance can access both the public and private members of
    9·1 answer
  • True or False. A modern programming EXE provides a text editor, a file manager, a compiler, a linker and loader, and tools for d
    9·1 answer
  • Gear systems with __________ can have both drive and driven gears on the same shaft. a. an odd number of gears b. an even number
    6·1 answer
  • Which best describes obliteration in a forged document?
    11·1 answer
  • True or false Encryption prevents hackers from hacking data?
    8·1 answer
  • All the following are the basis of the World Wide Web except:
    14·2 answers
  • Why Do You Need to Set Goals for a LinkedIn Automation Campaign?
    15·1 answer
  • Write a code segment that will store a dinner selection in option1 based on the values of rsvp and selection. The intended behav
    5·1 answer
  • A sample member of the list data is a1 = ['male', True] where the second item is True if the person is on the phone.
    15·2 answers
  • True or Fale A criminal defense attorney's main focus is to convict the accused of a crime, and a state prosecutor is to defend
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!