Why is my Triangle class not accepted?



Why is my Triangle class not accepted?


Here are a few common mistakes when creating the Triangle class and how to fix them:

  1. Forgetting to indent your code to be inside of the class Triangle code block – be sure to indent using 2 spaces per indentation level
  2. Not initializing the self.variable values with the arguments passed to the __init__() method
  3. Typos! Python has no way of knowing what you’re referring to unless you spell things exactly as they were spelled elsewhere, so keep a close eye on spelling, capitalization, and punctuation.

FAQ: Learn Python - Introduction to Bitwise Operators - Class Basics