Question: write code in python. name grade Jack 80 Joe 70 Jill 83 In table [ Iname, grade [ Jack, 80, IJoe, 70], tJill, 83] Write

write code in python.write code in python. name grade Jack 80 Joe 70 Jill 83

name grade Jack 80 Joe 70 Jill 83 In table [ I"name", "grade" [ "Jack", 80, I"Joe", 70], t"Jill", 83] Write a function that converts table from a list of lists to a list of dictionaries. 1. The first row is considered the keys of the records. 2. The rest of the rows in table are the records. 3. Your function must be pure, namely it does not modify table when computing the new list. In [1: def table_to_records (table): # YOUR CODE HERE raise NotImplementedError) In assrt (table to_records (table) -['name: 'Jack', 'grade': 80, ('name': Joe, 'grade' 70, ('name': 'Jill'. 'grade': 831) Write a function that converts table to a dictionary that maps student names to their grades In def student_grades (table): # YOUR CODE HERE raise NotImplementedError) In [ ]: assert ( student-grades (table) ('Jack': 80, "Joe': 70, "J11': 83})

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!