Write a Python program to display information about a planet in the solar system.
planet_name
and assign it the name of a planet (e.g., "Mars"
).distance_from_sun
and assign it the distance of the planet from the Sun in million kilometers (e.g., 228
).number_of_moons
and assign it the number of moons the planet has (e.g., 2
).fun_fact
and assign it a fun fact about the planet (e.g., "Mars is also known as the Red Planet!"
).print
function to display the following:"The planet I chose is [planet_name]."
"It is [distance_from_sun] million kilometers away from the Sun."
"It has [number_of_moons] moons."
"Did you know? [fun_fact]"
We’re always looking for international STEM educators to join our team. If you are interested, please send us a mail and we’ll get back to you!
If you have any questions, kindly send us a mail. Don’t forget to follow and like all our social accounts to get updates on competitions!