15.Class Basics


#1

https://www.codecademy.com/courses/python-intermediate-en-WL8e4/3/1?curriculum_id=4f89dab3d788890003000096#

why this works

and this doesn't


#2

Hi @rafeen ,

Check the spellings of all the variables.

For example, angle2 differs from angel2.


#3

thanx..it worked....

bt i cant understand why both codes work


#4

__init__() is a magic method, an important word her: method

a method is a function which is part of a class.

just like a normal function, we can make pass the function content:

def example():
   pass

or declare variables:

def example():
   angle1 = 60

#5

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