Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve the question. Make sure the test can start. def get_student_info (courses) : ''' Takes a list of dictionaries containing student grades and creates

Please solve the question. Make sure the test can start. def get_student_info(courses): ''' Takes a list of dictionaries containing student grades and creates a dictionary with a key for each student that maps to a list containing two values: the total number of grades that student received, and the average of those grade values. Arguments: courses: a list of dictionaries mapping student names to float grades Returns: a dictionary mapping student names to a list containing the total number of grades that student received and their grade average ''' pass def test_get_student_info(): assert get_student_info([{"Zoe": 3.6}]) == {"Zoe": [1, 3.6]} assert get_student_info([]) == {} input1 = [{"Zoe": 3.0, "Jack": 3.8, "Amanda": 3.0}, {"Zoe": 3.5, "David": 2.8}, {"Zoe": 4.0, "David": 4.0, "Amanda": 3.4, "Joely": 3.1}] output1 = {'Zoe': [3, 3.5], 'Jack': [1, 3.8], 'Amanda': [2, 3.2], 'David': [2, 3.4], 'Joely': [1, 3.1]} assert get_student_info(input1) == output1 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions