Question: 10. 5.0) Reading and understanding the following python program. Please write the outputs. class Dictcourse (): def __init__(self, courses) : self.courses = courses def get_courseName

 10. 5.0) Reading and understanding the following python program. Please write

10. 5.0) Reading and understanding the following python program. Please write the outputs. class Dictcourse (): def __init__(self, courses) : self.courses = courses def get_courseName (self, key): if key in self. courses. keys (): return self. courses [key] else: return ('not found') def update_course (self, newkey, newvalue): self. courses[newkey] = newvalue return self.courses def delete_course (self, key): if key in self.courses. keys (): del self. courses [key] return self. courses else: return ('not found') my_courses = Dictcourse({'101':'Python', '102':'Math', '103' :' Chinese'}) print (my_courses. get_courseName ('101'))' print (my_courses. update_course (' 104','English')). print (my_courses. delete_course ('102'))

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