MCQs > IT & Programming > Python > Output of the following Python code? class Son(object): def __init__(self, name): self.name = name def gN(self): return self.name def sE(self): return False class Ply(Son): def sE(self): return True mp = Son('1') print(mp.gN(), mp.sE()) mp = Ply('0') print(mp.gN(), mp.sE())

Python MCQs

What will be the correct output of the following Python code?

class Son(object):

def __init__(self, name):

    self.name = name

def gN(self):

    return self.name

def sE(self):

    return False

class Ply(Son):

def sE(self):

    return True

mp = Son("1")

print(mp.gN(), mp.sE())

mp = Ply("0")

print(mp.gN(), mp.sE())


Answer

Correct Answer:

 True
1 False

Explanation:

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it