Skip to content

Commit ffb8b1c

Browse files
committed
25-11-26 v002 + intro & ruff changes :planets-turtle.py
1 parent 1a262c9 commit ffb8b1c

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

planets-turtle.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
at https://github.com/wilsonmar/python-samples/blob/main/planets-turtle.py
66
77
This illustrates a simple 2D map of planets around our solar system,
8-
using the turtle library and Python object-oriented programming.
9-
https://res.cloudinary.com/dcajqrroq/image/upload/v1764224322/planets-turtle-1484x1060_jzgzpx.png
8+
using object-oriented programming and the turtle graphics library built into Python.
9+
to create planetary motion as shown by https://res.cloudinary.com/dcajqrroq/image/upload/v1764224322/planets-turtle-1484x1060_jzgzpx.png
1010
11-
Based on the Astronomy Animation
12-
from https://runestone.academy/ns/books/published/thinkcspy/Labs/astronomylab.html
11+
Based on the Astronomy Animation code before modifications
12+
of https://runestone.academy/ns/books/published/thinkcspy/Labs/astronomylab.html
13+
using data from https://ssd.jpl.nasa.gov/planets/phys_par.html
14+
adjusted to fit the screen:
1315
1416
| Body | ? | ? | ? | ? | ? | color |
1517
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
@@ -26,13 +28,14 @@
2628
2729
chmod +x planets-turtle.py
2830
ruff check planets-turtle.py
29-
uv run planets-turtle.py -s 3
31+
uv run planets-turtle.py
32+
TODO: Add parameter to specify speed of full build of solar system image.
3033
3134
AFTER RUN:
3235
rm -rf .ruff_cache
3336
"""
34-
__last_change__ = "25-11-26 v001 + new :planets-turtle.py"
35-
__status__ = "NOT WORKING - new"
37+
__last_change__ = "25-11-26 v002 + intro & ruff changes :planets-turtle.py"
38+
__status__ = "WORKING on macOS"
3639

3740
# Built-in packages internal to Python:
3841
import math
@@ -114,7 +117,7 @@ def get_mass(self):
114117
"""Get Mass."""
115118
return self.mass
116119

117-
def get_tmperature(self):
120+
def get_temperature(self):
118121
"""Get Temperature."""
119122
return self.temp
120123

0 commit comments

Comments
 (0)