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
OlgaM077 [116]
2 years ago
14

Course Aggregation Many times, departments are only interested with how students have done in courses relative to a specific maj

or when considering applicants for admission purposes.
For this problem you are given a dictionary where the keys are strings representing student ids and the values are dictionaries where the keys represent a course code and the value represents a grade. Your task is to write a function that given a dictionary of the described format and a prefix for course codes, return a dictionary where each key is a student id and the corresponding value is the average grade of the student only in courses that start with the given prefix.
def course_grader (student_to_grades, course_prefix): ({str, {str, float}}) -> {str, float} I: a dictionary containing the grades of students (as described above) and a course code prefix P: compute and store the average grade of all students only for courses that start with the given course prefix 0: a dictionary of student ids to average grades as described in the Processing step pass
Computers and Technology
1 answer:
nadezda [96]2 years ago
8 0

Answer:

def course_grader(student_to_grades, course_prefix):

   student_grades = dict()

   for key, value in student_to_grades.items():

       grade_score = 0

       for course,grade in value.items():  

           if course_prefix == course:  

               grade_score += grade

                student_grades[key] = grade_score / len(value.keys())

   return student_grades

Explanation:

The course_grader function is a python program that accepts two arguments, the student dictionary and the course prefix. The function returns a dictionary of the student id as the key and the average grade of the student as the value.

You might be interested in
What approach to dealing with deadlock does the wait-for graphs implement (prevention/avoidance/detection/ recovery)?
V125BC [204]
"detection" by checking for possible cycles or knots.
3 0
3 years ago
Which tools allows you to see the edition, version and memory use by windows 10?
cricket20 [7]

Answer:

Resource Monitor

Performance Monitor

Computer Management and Administrative Tools

Advanced User Accounts Tool

Disk Cleanup

Local Group Policy Editor

There is alot do u want them all?

6 0
3 years ago
..........................................
Scilla [17]

Answer:

jhhgvjgfhvbnbjvjn

Explanation:

7 0
3 years ago
Read 2 more answers
What translates binary data into images on a monitor?
g100num [7]
A video card is what allows a computer to translate the binary data into images.
8 0
3 years ago
What process sends ones and zeroes across network cables
sergejj [24]

Answer:

modulation

Explanation:

Modulation is the procedure of encoding data into electrical signals for transmission through a media. For transmission, binary information, denoted by a sequence of ones and zeros, should be translated to analog or digital electrical signals. The method converts data into electrical signals suited for transmission is known as modulation.  Digital modulation is the transmission of binary signals zeroes and ones.

5 0
2 years ago
Other questions:
  • Explain the relationship between society and the technologies of using Earth's resources?
    14·1 answer
  • A. True
    5·1 answer
  • You are an administrator for contoso.com. you have two servers called server1 and server2 that run windows server 2012 and have
    9·1 answer
  • To increase the view of a document on the screen, use the _____. View icon Zoom slider full-screen reading boldface font
    9·1 answer
  • A blue NFiPA label indicates: A) Health Hazard B) Special information C) Flammability D) Reactivity
    6·2 answers
  • An ip address in the address range 169.254.x.y, used by a computer when it cannot successfully lease an ip address from a dhcp s
    6·1 answer
  • Which type of boot authentciation is more secure?
    10·1 answer
  • What will the computer do in response to a line of code reading # name = input("What is your name?")
    7·1 answer
  • Combination of star topology and star topology can consider as hybrid?​
    11·1 answer
  • It is a single strand of metal capable of transmitting power or data from one area to<br> another
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!