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())
Options

1.Why False

Why True

2.Error

3.John False

4.John False

5.Abram True

Abram True

Related Posts

Close Bitnami banner
Bitnami