Question: Using the three lists below, create a dictionary as follows and name it students. items in the ids list are the keys. A name from

Using the three lists below, create a dictionary as follows and name it "students".

  • items in the ids list are the keys.
  • A name from the names list and the corresponding score from the score list together make a value for the dictionary in a list. See the example below.
  • # Use these lists 
  • scores = [13, 17, 9, 15, 8, 14, 16, 12, 13, 15, 14, 9, 10, 12, 13, 7, 12, 15, 9, 17]
  • names = ['Liam', 'Olivia', 'Noah', 'Emma', 'Oliver', 'Charlotte', 'Elijah', 'Amelia', 'James', 'Ava',          'William', 'Sophia', 'Benjamin', 'Isabella', 'Lucas', 'Mia', 'Henry', 'Evelyn', 'Theodore', 'Harper']
  • ids = ['lia865', 'oli836', 'noa527', 'emm759', 'oli945', 'cha149', 'eli580', 'ame245', 'jam621', 'ava548',        'wil406', 'sop555', 'ben841', 'isa367', 'luc384', 'mia762', 'hen538', 'eve859', 'the876', 'har508']

 

# Answer should lok like the dictionary below.# students = {'lia865': ['Liam, 13'], 'oli836': ['Olivia', 15],....}

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 Algorithms Questions!