Answered step by step
Verified Expert Solution
Question
1 Approved Answer
First Name Student ID Mary 1001 Peter 1005 Alexandra 1009 Sonia 1010 1 - If you are planning to use a dictionary, which field
First Name Student ID Mary 1001 Peter 1005 Alexandra 1009 Sonia 1010 1 - If you are planning to use a dictionary, which field should be the key and which one the value? Write your answer using python comments. 2- Write code to initialize a list containing these pairs of names and student IDs as tuple 3- Write code to initialize a dictionary containing these values. 4- Write code to remove the following pair from the list: Mary 1001 5- Write code to remove the following pair from the dictionary: Mary 1001 6 - Write a function that takes (1) a list (with name and Student ID tuples) and (2) a student ID as input parameters. It returns all the student IDs associated with that name. The function must use a "for loop"
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started