Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You have been given the following lists of students and their test scores: names = [joe, tom, barb, sue, sally] scores=[10, 23, 13, 18, 12]

You have been given the following lists of students and their test scores: names = [joe, tom, barb, sue, sally] scores=[10, 23, 13, 18, 12] (8 pts) Write a function makeMixedList, that takes 2 lists and returns 1 list that combines the names with the scores, like this: [joe, 12, tom, 23, ...etc...]. Of course, this should work for any 2 lists that you give the function. (10 pts) Write a function, makeDictionary, that takes the 2 lists and returns 1 dictionary with the names as the keys and the scores as the values. Assign the result of makeDictionary to scoreDict which will be used in the exercises that follow. (5 pts) Using scoreDict, find the score for barb. (2 pts) What instruction(s) would you use to add a new person to the new dictionary, john and his score of 19? (2 pts) Create a sorted list of all the scores in scoreDict. (2 pts) Calculate the average of all the scores in scoreDict. (2 pts) What instruction(s) would you use to update the score for sally to be 13? (3 pts) Tom has just dropped this class. Delete tom and his score from scoreDict. (6 pts) Print out a table of students and their scores with the students listed in alphabetical order

I KNOW HOT TO DO ALL THE PROBLEM EXCEPT THE LAST ONE: PRINT OUT A TABLE OF STUDENTS AND THEIR SCORES WITH THE STUDENTS LISTED IN ALPHABETICAL ORDER. CAN SOMEONE HELP THANKS SO MUCH!

:)

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_2

Step: 3

blur-text-image_3

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

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions