Python :Introduction to Classes-Class Basics


#1

Hello Friends ,I am stuck at


https://www.codecademy.com/courses/python-intermediate-en-WL8e4/3/1?curriculum_id=4f89dab3d788890003000096#
Following is my code. It does not pass. I get following error message

Oops, try again. Did you create a class with the name Triangle?
``` 

```python
class Triangle(object):
    def __init__(self,angle1,angle2,angle3):
        self.angle1=angle1
        self.angle2=angle2
        self.angle3=sngle3

I can't find my mistake .Please help me.Thanks in advance


#2

self.angle3=sngle3

You wrote angle3 as sngle3

I hope it helps :slight_smile:


#3

Thanks,It solved my problem.But I have one follow-up question.How did computer know that I meant "angle3" instead of "sngle3"


#4

It's the CodeAcademy's intelligent compiler/Editor that test and see if someone spelt/wrote code correctly
or not! :slight_smile:


#5

It's the CodeAcademy's intelligent compiler/Editor that test and see if someone spelt/wrote code correctly
or not! :slight_smile:


#6

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