Question: Can someone help me get a code to output the following in python? Please provide explanation for further understanding // Planet's Average Distance From Sun
Can someone help me get a code to output the following in python?
Please provide explanation for further understanding
// Planet's Average Distance From Sun //
?? not actual miles 1 Mercury = 57 miles 2 Venus = 108 miles 3 Earth = 150 miles 4 Mars = 228 miles 5 Jupiter = 779 miles 6 Saturn = 1430 miles 7 Uranus = 2880 miles 8 Neptune = 4500 miles ============================================================ To calculate the distance between two planets Enter two planet numbers or 0 to quit: ------------------------------------------------------------ Please enter the 1st Planet #1 Please enter the 2nd Planet #2 Mercury and Venus are on average 51 million miles apart Press enter to continue... ------------------------------------------------------------ Enter two planet numbers or 0 to quit: ------------------------------------------------------------ Please enter the 1st Planet #1 Please enter the 2nd Planet #1 Invalid Input: The same planet was entered twice Please enter the 2nd Planet #kii Invalid Input: Please enter a number. Please enter the 2nd Planet #550 Invalid Input: Please enter a number between 0 and 8. Please enter the 2nd Planet #0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
