πŸ“Š Python
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
πŸ’¬ Discuss
βœ… Correct Answer: (A) 12

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
301
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Prashant
Publisher
πŸ“ˆ
94%
Success Rate