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
What are TWO examples of soft skills?
Elanso [62]
Computer programming and throubleshooting
3 0
3 years ago
Python full code not displaying<br>only hello prints
tankabanditka [31]
From the code you posted, there is no function call to vendingMachine()

Try at the top of your code:

print ("hello")
vendingMachine()

def vendingMachine():
...
5 0
3 years ago
________ can contain stacked images, text, and other elements which collectively comprise a Photoshop file.
emmasim [6.3K]
If you don’t mind can u add the picture it helps me Answer the question better
6 0
2 years ago
The random module is a group of functions that are used to deal with random numbers.
maksim [4K]
True because it is the
5 0
3 years ago
Read 2 more answers
​Five elements that can prove the genuineness of a user. What you know, what you have, what you are, what you do, and where you
nataly862011 [7]

Authentication factors are the factors that describe about the ingenuition or origination of the user. This is the tag that tells about the actuality of user that is getting connected with internet by the five elementals.

Hope this helps!

8 0
3 years ago
Other questions:
  • A customer has contacted you to help him alleviate the large amount of time and effort that goes into adding and removing users
    12·1 answer
  • Which shortcut brings up the Print screen?
    10·2 answers
  • Which of these automotive repair areas helps the vehicle change speeds to operate efficiently under all conditions?
    5·1 answer
  • You receive $50 as a birthday gift and choose to spend it all on new wallpaper for your room. The opportunity cost of this decis
    7·1 answer
  • A computerized spreadsheet program is useful for
    6·2 answers
  • In this problem, we explore some of the properties of the CRC. For the generator G (=1001) given in Section 5.2.3, answer the fo
    14·1 answer
  • PowerPoint provides a wide variety of predefined shapes that can add visual insert to a slide true or false
    10·2 answers
  • 9. Which of the following is the<br>leading use of computer?​
    13·1 answer
  • Which of these is NOT a usual result of having friends at work?
    8·1 answer
  • Who is famous for his three laws of robotics?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!