I am trying to create a really simple Python program where I can input a planet by its name and have the approximate distance stated. Currently, I have the seven planets listed and equal to their distances right below that eval function.
This is what the code looks like currently:
def = def Planet_Calculations():
Planet = exec(input("What planet are you trying to calculate the distance for? (Note: Pluto is no longer a planet!) "))
Mercury = 56,974,146
Venus = 25,724,767
Earth = 0
Mars = 48,678,219
Jupiter = 390,674,710
Saturn = 792,248,270
Uranus = 1,692,662,530
Neptune = 2,703,959,960
print("The distance to the specified planet is approxametly:" , Planet, "million miles from Earth." )
Planet_Calculations()
When I try to type in a planet such as "Mars" into the eval, I have no idea how to actually have the program input its distance into the print function further down. I would greatly appreciate any type of feedback or help.