FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
programmingWithPythonCode/classes/circle_user.py at main · mlecjm/programmingWithPythonCode · GitHub
mlecjm
programmingWithPythonCode
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
programmingWithPythonCode
/
classes
/
circle_user.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
13 lines (11 loc) · 517 Bytes
Breadcrumbs
programmingWithPythonCode
/
classes
/
circle_user.py
Copy path
File metadata and controls
13 lines (11 loc) · 517 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
"""Examples for using our class :class:`Circle`."""
from
circle
import
Circle
from
point
import
Point
from
shape
import
Shape
circ
:
Circle
=
Circle
(
Point
(
2
,
3
),
5
)
print
(
f" center: (
{
circ
.
center
.
x
}
,
{
circ
.
center
.
y
}
)"
)
print
(
f" radius:
{
circ
.
radius
}
"
)
print
(
f" perimeter:
{
circ
.
perimeter
()
}
"
)
print
(
f" area:
{
circ
.
area
()
}
"
)
print
(
f"isinstance(circ, Circle):
{
isinstance
(
circ
,
Circle
)
}
"
)
print
(
f" isinstance(circ, Shape):
{
isinstance
(
circ
,
Shape
)
}
"
)
Back
|
FazBrowse Home
|
New Git URL