Skip to content
What will be the display output of the following code:class…
Questions
Whаt will be the displаy оutput оf the fоllowing code:clаss DeskTopFile(object): def __init__ (self, name): self.name = name + self.suffix def rightClickProperties (self): return ('Show properties for file '+self.name)class Txt (DeskTopFile): suffix = '.txt' def leftClickOpen (self): return ('Notepad opening file '+self.name) def rightClickProperties (self): return (self.name+ ‘ properties are shown below---- ‘) class Word (DeskTopFile): suffix = '.doc' def leftClickOpen (self): return ('MS Word opening file '+self.name)class PowerPoint: suffix = '.ppt' def __init__ (self, name): self.name = name + PowerPoint.suffix def leftClickOpen (self): return ('Opening PowerPoint file '+self.name)# Global code follows-----------------------------------------------------------------------------------d1 = Word(‘Essay13’)d2 = Txt(‘Note23’)d3 = PowerPoint(‘Slides34’)documents = [Txt(‘Scribbles’), Word(‘MyDoc’), PowerPoint(‘Slides25’)]for d in documents: print(d.leftClickOpen() ) print(d.rightClickProperties() ) if type(d) == Word: break