|
5 | 5 | at https://github.com/wilsonmar/python-samples/blob/main/planets-turtle.py |
6 | 6 |
|
7 | 7 | 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 |
10 | 10 |
|
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: |
13 | 15 |
|
14 | 16 | | Body | ? | ? | ? | ? | ? | color | |
15 | 17 | |:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| |
|
26 | 28 |
|
27 | 29 | chmod +x planets-turtle.py |
28 | 30 | 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. |
30 | 33 |
|
31 | 34 | AFTER RUN: |
32 | 35 | rm -rf .ruff_cache |
33 | 36 | """ |
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" |
36 | 39 |
|
37 | 40 | # Built-in packages internal to Python: |
38 | 41 | import math |
@@ -114,7 +117,7 @@ def get_mass(self): |
114 | 117 | """Get Mass.""" |
115 | 118 | return self.mass |
116 | 119 |
|
117 | | - def get_tmperature(self): |
| 120 | + def get_temperature(self): |
118 | 121 | """Get Temperature.""" |
119 | 122 | return self.temp |
120 | 123 |
|
|
0 commit comments