I see.Take a look at the first line you have typed.
>>> my_circle
<__main__.Circle instance at 0x302221E8>
What this line is telling that 'my_circle' is an instance of the Circle class living at address location 0x302221E8. That is it - nothing more or less. The notion of a class is following the principles of object-oriented programming and again is not really something I would recommend to a beginner. You can google/bing/yahoo "object-oriented principles" but the findings are probably more confusing than helpful right now.How does the Python line help you right now? Not at all.....You want to find out what this 'my_circle' thing really is and the Python way to do that is
>>> dir(my_circle)
['__doc__', '__init__', '__module__', 'radius']
The Python dir() function will tell you more an object, its attributes and methods.For 'my_circle' you can see that there built-in functions like __doc__, __init__, __module__ and you also find the class attribute radius. In order to find the radius of the my_circle objects you would write
>>> print my_circle.radius
1
Again my recommendation would be: don't use the class syntax -- it is over-engineering the problem. Keep it simple and use variables as of now such that:
myCircleRadius = 2
myCircleCircumference = 2 * 3.14 * myCircleRadius
- Thomas