Answered step by step
Verified Expert Solution
Link Copied!

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


image.png 

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

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

Auditing and Assurance services an integrated approach

Authors: Alvin a. arens, Randal j. elder, Mark s. Beasley

14th Edition

133081605, 132575957, 9780133081602, 978-0132575959

More Books

Students also viewed these Algorithms questions

Question

What training is required for the position?

Answered: 1 week ago