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
Iain Watson
3,031 PointsOOP Python circle.py
My workspace doesn't recognize my class Circle. Any suggestions? Just trying to follow the code in the video.
Thanks,
Iain Watson
2 Answers
cb123
Courses Plus Student 9,858 PointsThere are 2 issues with your code.
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 ...
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.
Iain Watson
3,031 PointsThanks. So easy to get tripped up by silly mistakes. Time for machine intelligence code review.