Learn
Introduction to Classes
Instantiate an Object

Let’s go ahead and create an instance of our Triangle class.

Instructions

1.

Create a variable named my_triangle and set it equal to a new instance of your Triangle class. Pass it three angles that sum to 180 (e.g. 90, 30, 60).

Print out my_triangle.number_of_sides

Print out my_triangle.check_angles()

Folder Icon

Take this course for free

Already have an account?