Determine the output

What will be the output of the given code snippet?

class Run(object):
        # Constructor
        def __init__(boy, why):
                boy.why = why

        def Identity(boy):
                return boy.why

        def isBoy(boy):
                return False

class Forrest(Run):
        def isBoy(boy):
                return True
x= Run("John")
print(x.Identity(), x.isBoy())

x = Forrest("Abram") 
print(x.Identity(), x.isBoy())

1.Why False

Why True


3.John False

4.John False

5.Abram True

Abram True

Related Posts

Close Bitnami banner