Question: a) Create a dictionary called itc_subjects to store the mappings between the following subject codes and their corresponding titles: code title 161 computer systems 211
a) Create a dictionary called itc_subjects to store the mappings between the following subject codes and their corresponding titles:
code title
161 computer systems
211 system Analysis
212 Internet Technologies
358 Cyber Security
b) Write code to iterate over the dictionary created in part (a) and print the titles of subjects with codes larger than 100 but less than 300. (3 marks)
c) Consider the following lists:
s1 = [114, 204, 206, 303, 313, 397]
s2 = [331, 205, 309]
Write code to create a new list s3 that contains the elements of both s1 and s2 sorted from highest to lowest. (3 marks)
d) If you want to create a sequence to represent the days of the week (not likely to change), would you use a list or a tuple? Why? (2 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
