Class it up


#1

I don't understand why i get this mistake?

Like, I put self as argument for the method, no?

thanks in advance for your help!!


#2

In your check_angles() method you shouldn't have angle1, angle2 and angle3 passed in as arguments because you're not referencing them, you're referencing self.angle1 etc. In other words, self should be the only argument.

As for the actual error, I imagine the SCT (Submissions Correctness Test) is checking that the method only contains self, hence the somewhat misleading message.


#3

ahhhhhhh!!! okok yeah i thought it was somewhat ineffective to remind the angleX arguments.

Thanks a lot for your answer!


#4

Why it is incorrect to write:
if sum(self.angle1, self.angle2, self.angle3) == 180:
I thought it would be the same as: if self.angle1 + self.angle2 + self.angle3 == 180:
but it is wrong.


#5

sum() takes an iterable (such as a list or dict) as its argument, for example sum([x, y, z])


#6

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