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
Redesign the cover of science textbook using at least two different graphics​
Tanya [424]

Answer:

what design do you want, also what design am i redesigning.

8 0
2 years ago
Which types of scenarios would the NETWORKDAYS function help calculate? Check all that apply.
inna [77]

Answer:

A. days of vacation time left

B. days of school left in the year

D. years of service someone performed

Explanation:

The NETWORKDAYS function is a built in excel function which makes it easy to calculate the number of days between two specified dates the start date and the end date, this function when applied excludes weekends from the days calculated and one has the opportunity of specifying certain holidays. With this function. The number of days till vacation, the number school days left. The NETWORKDAYS is a very versatile function.

7 0
2 years ago
Computer software licensed under exclusive legal right of the copyright holder with the intent that the licensee is given the ri
Shkiper50 [21]

Answer:

The following statement is 'True'.

Explanation:

There is a software named 'Proprietary software' and also called 'closed-source software', it's non-free software and used to describe the software that is not freely licensed such as operating system, file formats, and system programs. this software is licensed for studying, sharing, modification, redistribution and reverse engineering and has the copyright to use the software under only certain conditions and we can also say that it bears limit against these types of uses.

6 0
3 years ago
you need to configure a wireless network using wpa2-enterprise. which of the following components should be part of your design?
Iteru [2.4K]

Answer: AES encryption

802.1x

Explanation:

4 0
2 years ago
Well I am having trouble and I feel really bad because I helped RandomGuy1 who rubs it in my face that I gave him the wrong answ
yawa3891 [41]
Hey dude don't leave tell a mod bout it they'll fix everything up for you.
8 0
3 years ago
Other questions:
  • Which is not an example of a boolean operator?
    6·2 answers
  • Which of the Arts, A/V Technology, and Communication career cluster pathways are involved with producing a product for an audien
    8·2 answers
  • What are the useful techniques in program design?
    12·1 answer
  • Write the sum of products, the canonical product of sums, theminterm shorthand and the maxterm shorthand for the following:
    6·1 answer
  • Which of the following is the correct binary representation of the number 2?
    14·1 answer
  • 1) Using the density equation d=m/V: What is the density of a piece of metal with a mass o
    10·1 answer
  • Services such as water, electricity, and phone communications are called:
    7·1 answer
  • Susan works for a company that values their employees me and deadlines in finding ways to keep the cost of doing business low wh
    12·1 answer
  • Discuss, in detail, the usefulness of graphics and images in program development. Explain the importance of the interface of a c
    7·1 answer
  • Who ever can get me the lyrics to raining tacos will get 46 points + the crown! i want the song!
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!