Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

OOP Python circle.py

My workspace doesn't recognize my class Circle. Any suggestions? Just trying to follow the code in the video.

http://w.trhou.se/pr3st7eofn

Thanks,

Iain Watson

2 Answers

There are 2 issues with your code.

  1. For the Circle issue. This is due to indentation. Your commands that you are trying to use to call your Circle class are residing within the class. Fix those then ...

  2. After solving the indentation, you should hit another issue where diameter is not defined. Although you are using diameter with self.diameter = diameter you have not declared diameter to be used by __init__().

Once you resolve this then you should be successful. I hope this helps.

Thanks. So easy to get tripped up by silly mistakes. Time for machine intelligence code review.