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]
3 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]3 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
Sonora wants to extend the cells to be added in her formula. what is the quickest way to add more sells?
alexira [117]
It’s D left click that’s the answer
8 0
4 years ago
Read 2 more answers
While checking your work e-mail, you have received an e-mail warning you about a virus that is currently doing the rounds. What
choli [55]

Answer: D) Do an extensive web search to learn if it is a real virus.

Logical explanation: In the example, it is not a pop-up that you have a virus and instead an email that you have a virus. There is a very likely way that it could be a prank, scam, or a hacker.

Elimination explanation: If we look at all the answers:

A (Forward it to everyone in your address book) makes no sense, so A is eliminated.

Then with B (Forward it to your tech administrator) makes sense because if it was a real virus they may know what to do, but as my 'Logical explanation' explains, it may not be.

Finally with C, it's very irresponsible and should not be done. If it was a real virus there is a possibility it could be someone trying to steal information and more.

This leaves only option D left. :)

<h2><u>If this helped at all (or not), please remember to rate, thank, and mark brainliest as seen fit. Have a great day and stay safe! :)</u></h2>
4 0
3 years ago
01110111 01101000 01100001 01110100 00100000 01101001 01110011 00100000 00110001 00101011 00110001
Lera25 [3.4K]
Same lol thesis so me right now
7 0
4 years ago
You are configuring a wireless network with two wireless access points. Both access points connect to the same wired network. Yo
krok68 [10]

Answer:

have the same SSID but different channels

Explanation:

Based on the information provided within the question it can be said that the best option to accomplish this would be to have the same SSID but different channels. This would maintain the users connected to the same network name (SSID) but still be able to roam and jump from one access point to the other.

7 0
3 years ago
Read 2 more answers
Repayment of a direct plus loan begins:
just olya [345]
The answer is D I hope i'm right


4 0
4 years ago
Read 2 more answers
Other questions:
  • When typing in a cell, hitting Tab will bring which result?
    12·2 answers
  • Write a C program that creates two threads to run the Fibonacci and the Runner processes. Threads will indicate the start and th
    14·1 answer
  • Write a program named SortWords that includes a method named SortAndDisplayWords that accepts any number of words, sorts them in
    10·1 answer
  • Write a MASM program to calculate Fibonacci numbers:
    10·1 answer
  • You are part of an Information Systems project team. Your job is to ensure that the technology and vendor suggested for use in t
    12·1 answer
  • Who is the host in super monkey ball?
    14·1 answer
  • If you forget your privacy password what will you do if the ask this question what is the name of one of your teacher?​
    12·1 answer
  • You have imported a library with the birthMonth() function. Based on the API, how many strings are inputed to calculate the birt
    11·1 answer
  • I will mark Brainliest if you sub to Huggablesheep 89 he said he is going to quit if he gets 50 subs he might try again please h
    8·2 answers
  • Write a C program that reads two hexadecimal values from the keyboard and then stores the two values into two variables of type
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!