0
How to solve attribute error? What is wrong in this code.
On running code the python idle showing me Attribute Error. I have checked everything but i found nothing wrong in my code. Programšš»šš»šš» class pri: def__init__(self,num1,num2): self.num1=num1 self.num2=num2 def add(self): print('Addn Result:', self.num1+self.num2) p1=pri(96,85) p2=pri(93,78) p1.add()
1 Answer
+ 2
Your code seems to run without any problems in the code playground. The only issue is that there's a space missing between def and __init__