N

Neha Sharma • 6.85K Points
Tutor III

Q. What will be the output of the following Python code?

Code:
class tester:
    def __init__(self, id):
        self.id = str(id)
        id="224"
 
>>>temp = tester(12)
>>>print(temp.id)
  • (A) 12
  • (B) 224
  • (C) None
  • (D) Error
  • Correct Answer - Option(A)
  • Views: 133
  • Filed under category Python

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics