Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In Python ... What does the following code fragment print? class Shape: def __in

ID: 657929 • Letter: I

Question

In Python ...

What does the following code fragment print?

class Shape:

    def __init__ (self, size):         

        self.size = 10

class Trangle (Shape):

    def getSize (self):

        size = 12

        return self.size

pythagores = Triangle ()

print (pythagores.getSize ())

What does the following code fragment print?

class Shape:

    def __init__ (self, size):         

        self.size = 10

class Trangle (Shape):

    def getSize (self):

        size = 12

        return self.size

pythagores = Triangle ()

print (pythagores.getSize ())

Explanation / Answer

screen print=12;
memory got the block of size.
then call accepted through the self.size dunction
it will call to the size block memory
it will got the address and print on the screen 12 .

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote