What is the output of the following code? class A: def __init__(self, x): self.x = x x = 44 a = A(4) print(a.x)

Questions & AnswersCategory: PythonWhat is the output of the following code? class A: def __init__(self, x): self.x = x x = 44 a = A(4) print(a.x)
Geek Boy Staff asked 2 years ago

What is the output of the following code?

class A:
    def __init__(self, x):
        self.x = x
        x = 44

a = A(4)
print(a.x)

a. None of the above
b. 4
c. Syntax Error
d. 44