No attribute named angle3


class Triangle(object):
number_of_sides = 3
def init(self, angle1, angle2, angle3):
self.angle1 = angle1
self.angle2 = angle2
self.angle3 = angle3
def check_angles(self):
if self.angle1 + self.angle2 + self.angle3 == 180:
return True
return False

class Equilateral(Triangle):
angle = 60
def init(self):
self.angle1 = self.angle2 = self.agnle3 = self.angle

Why I've got this message? Oops, try again.
It looks like no attribute named angle3 is created for a newly created Equilateral object.

I can't find error. Pls anybody help to solve this issue.


Here last line. You spelled angle wrong.


Oh my God! You know I couldn't find this mistake about 10 hours, you helped me very much. Thank you! By the way is it possible to add syntax checking function? Thanks again.


Hmm...I'm not too knowledgeable on syntax checking functions that can be added. I know a website that has a live syntax checker known as

Someone here posted about them making one that can be used: link
But I didn't look into it much. Feel free to have a look.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.