Question: Q1: Write a Python code to do the following: ( 7 marks) - Create a dictionary (dect) with values : 2 marks - Noura:30, Sara:40,
Q1: Write a Python code to do the following: ( 7 marks) - Create a dictionary (dect) with values : 2 marks - Noura:30, Sara:40, Nouf:90. - Write an if statement that determines whether the key 'Sara' exists in the dictionary. 3 marks - If so, assign the value of 'Sara' to a key of 'Nouf', and then delete 'Sara' and its associated value. - Add a new item: Maha : 1002 marks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
