Question: Lab 2D Example Input: How long does it take to get from Earth to Mars? The answer is it depends. On what, you ask? Well,

Lab 2D Example Input: How long does it take to get from Earth to Mars? The answer is "it depends". On what, you ask? Well, to keep things simple, we will consider the simplest distance formula: Distance = Rate x Time 10 125 22455 134 24658.9 227 14707.3 308.9 34469.5 137 32047 131 31810 140 24016 54.5 24278 259.2 14567.3 46 27533.9 Which can be re-written as: Time = Distance Rate In other words, the time it takes to get somewhere depends on how far we need to go and how fast we travel getting there. So how far away is Mars anyway? And how fast can we travel? Program Output Your program should print out how long it will take the ship to reach Mars in the following format: Mars is the fourth planet from the sun, and the second closest to Earth (Venus is the closest). But the distance between the two planets is constantly changing as they travel around the sun. In theory, the closest that Earth and Mars would approach each other would be when Mars is at its closest point to the sun (perihelion) and Earth is at its farthest (aphelion). This would put the planets only 33.9 million miles apart. However, this has never happened in recorded history. The closest approach of the two planets occurred in 2003, when they were only 34.8 million miles apart. The two planets are farthest apart when they are both at their farthest from the sun, on opposite sides of the star. At this point, they can be 250 million miles apart. Time to Mars:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
