TypeError: must be real number, not Circle
TypeError: must be real number, not Circle import math as m class Circle: def __init__(self,radius): self.radius = radius count = 0 def area(r): k = m.pi * m.pow(r,2) return k I am not sure what wrong with the code above but when I am trying execute like below a = Circle(4) a.area() it throws an error like " k = m.pi * m.pow(r,2) TypeError: must be real number, not Circle" Unable to understand how it's considering the float value as an instance to the circle. Why import math as m ? – Reblochon Masque Jun 30 at 8:28 import math as m Just for convenience to use m. instead of math. – Mahesh Jun 30 at 11:15 ...