Question OOP-ENC-0008
MediumWhat is the output of this code?
class Account:
def __init__(self):
self.__balance = 100
a = Account()
try:
print(a.__balance)
except AttributeError:
print("Error: attribute not found")
- A.
Error: attribute not found
- B.
None
- C.
Sign up free to see the answer and a step-by-step explanation.