P2.3.4Planet symbols in Unicode
Find the Unicode code points for the planet symbols listed on the NASA website, which mostly fall within the hex range 2600-26FF: Miscellaneous Symbols (see this chart) and output a list of planet names and symbols.
Show solution
The following uses the more usual "circled-plus" symbol for Earth.
>>> print(' Sun: \u2609', 'Mercury: \u263F', ' Venus: \u2640',
' Earth: \u2295', ' Mars: \u2642', 'Jupiter: \u2643',
' Saturn: \u2644', ' Uranus: \u26E2', 'Neptune: \u2646',
sep='\n')
Sun: ☉
Mercury: ☿
Venus: ♀
Earth: ⊕
Mars: ♂
Jupiter: ♃
Saturn: ♄
Uranus: ⛢
Neptune: ♆
(You may or may not see these symbols printed correctly in your browser depending on which fonts you have installed.)