MCQs > IT & Programming > Python > Output of the following Python code? class St: stm = 'B' stm = 'A' def __init__(self, r): self.r = r a = St(101) b = St(102) print(a.stm) print(b.stm) print(a.r) print(St.stm)

Python MCQs

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

class St:

stm = 'B' stm = 'A' def __init__(self, r): self.r = r a = St(101) b = St(102) print(a.stm) print(b.stm) print(a.r) print(St.stm)

Answer

Correct Answer:

A

A

101

A


Explanation:

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