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
Im trying to type in answers but where the text box is supposed to be it says unlock answers. What does that mean?
borishaifa [10]
You may have to pay or sign up for the text box or if it is a computer program you may need to get the full version of the software if it is a trial
3 0
3 years ago
To quit, a user types 'q'. To continue, a user types any other key. Which expression evaluates to true if a user should continue
devlian [24]

Answer:

!(key == 'q')

Explanation:

Based on the description, the coded expression that would equate to this would be

!(key == 'q')

This piece of code basically states that "if key pressed is not equal to q", this is because the ! symbol represents "not" in programming. Meaning that whatever value the comparison outputs, it is swapped for the opposite. In this case, the user would press anything other than 'q' to continue, this would make the expression output False, but the ! operator makes it output True instead.

3 0
3 years ago
Im trying to figure out how to write a program that finds prime factors of a number. I have the following but it only works for
Paladinen [302]
The reason your program isn't working is because you put the n=12 now when you put the other n's in the code it causes it to only work with the number 12
7 0
4 years ago
In which stage of the SDLC is it most appropriate to use prototyping?
bixtya [17]

<u>Answer:</u>

<em>When system feasibility is being determined </em>

<u>Explanation:</u>

<em>Prototyping is the part of Requirement and Analysis phase. </em>It is the phase where the client and the development team sits and discuss about what the requirement is and show <em>a model of what are all the things which they could bring up the requirement as a software. </em>

So here, the prototyping is really essential to visually understand how the team has interpreted the requirement and how far it matches with the client. <em>All the other options stands invalid in the given context.</em>

7 0
3 years ago
Read 2 more answers
. Briefly describe an SQL DML statement for storing new data into a table.
STatiana [176]

DML stands for Data Manipulation Language.

SQL DML statements consist of insert, update and delete statements.

Out of these three, insert is used to add new data to the table.

The update command modifies the existing data in the given table.

The delete command removes the data from the given table.

Syntax

INSERT INTO table_name ( column1, column2, …….. )

VALUES ( value1, value2, ……… )

The table_name represents the table in which data is to be inserted.

All the columns in the table_name need to be specified in the brackets in the insert into clause.

All the values in the values clause should correspond to the columns, both in the order in which the columns are mentioned and the data type of the values should match the respective column.

Example

Consider the table Person consisting of columns id, name, gender having data type integer, varchar and varchar, respectively.

In order to add data to all the columns of the Person table, the command is as follows.

Insert into Person ( id, name, gender )

Values ( 101, “Alexis”, “Male” );

In the above command, value is present for each column in the respective order. Also, the format of the data match the format of the columns.

Other versions of the insert command add data only to some columns in the table.

Insert into Person ( id, name )

Values ( 102, “Aayesha” );

The above command adds data only to two columns as mentioned.

Also, null value can be added using insert command.

Insert into Person ( id, name, gender )

Values ( 103, “Brainly dot com”, null );

Since null value appears at number three, the corresponding column to this value is also number three, i.e., gender column.

This inserts null value as the gender for Brainly dot com.

3 0
3 years ago
Other questions:
  • Which loan type requires you to make loan payments while you’re attending school?
    7·1 answer
  • ________ computers are specially designed computer chips that reside inside other devices such as your car or the electronic the
    9·1 answer
  • Please help
    5·2 answers
  • What does a fallout appear under in a word processing program
    6·1 answer
  • What is the most common concern with using variable frequency drives?
    6·1 answer
  • g You are looking to rob a jewelry store. You have been staking it out for a couple of weeks now and have learned the weights an
    10·1 answer
  • Uuhdcnkhbbbbhbnbbbbnnnnnnnnnfddjkjfs
    14·1 answer
  • Please!! I need help, this is due by tonight!!!
    11·1 answer
  • Pls help me!! I will give 35 points and mark brainliest !!!
    10·1 answer
  • Taking this driver education course
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!