-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path4_solar_system.py
29 lines (16 loc) · 1 KB
/
4_solar_system.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# http://nssdc.gsfc.nasa.gov/planetary/factsheet/planet_table_ratio.html
mercury = { 'name': 'Mercury', 'mass': 0.6, 'distance': 0.4, 'moons': 0 }
venus = { 'name': 'Venus', 'mass': 0.8, 'distance': 0.7, 'moons': 0 }
earth = { 'name': 'Earth', 'mass': 1, 'distance': 1, 'moons': 1 }
mars = { 'name': 'Mars', 'mass': 0.1, 'distance': 1.5, 'moons': 2 }
jupiter = { 'name': 'Jupiter', 'mass': 317.8, 'distance': 5.2, 'moons': 67 }
saturn = { 'name': 'Saturn', 'mass': 95.2, 'distance': 9.6, 'moons': 62 }
uranus = { 'name': 'Uranus', 'mass': 14.5, 'distance': 19.2, 'moons': 27 }
neptune = { 'name': 'Neptune', 'mass': 17.1, 'distance': 30.1, 'moons': 14 }
planets = [mercury, venus, earth, mars, jupiter, saturn, uranus, neptune]
# Write code that will answer the following questions:
# ----------------------------------------------------
# How many planets are there?
# How many moons revolve around Jupiter?
# How many moons are there in our solar system?
# Display all of the planet names in alphabetical order