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

 Basic python please Lab 2D How long does it take toget from Earth to Mars? The answer is it depends". On what,you ask? Well, to keep things simple, we will consider the simplestdistance formula: Distance = Rate x Time Which can be re-written as:

Basic python please

Lab 2D 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 Which can be re-written as: Distance Time = 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? 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. The fastest spacecraft launched from Earth was NASA's New Horizons mission, which is en route to Pluto. In January 2006, the probe left Earth at 36,000 miles per hour. Program Input The first line of the file Lab2D.txt will contain a positive integer T denoting the number of test cases that follow. Each test case will have the following input: A single line containing two numbers separated by a space. The numbers will be as follows: o The first number will be the distance between Mars and Earth, measured in millions of miles. The number could be an integer or a decimal. o The second number will be the speed of the ship, measured in miles per hour. The number could be an integer or a decimal. Program Output Your program should print out how long it will take the ship to reach Mars in the following format: Time to Mars: days, hours, minutes, seconds Example Output: Time to Mars: 231 days, 22 hours, 41 minutes, 20 seconds Time to Mars: 226 days, 10 hours, 8 minutes, 36 seconds Time to Mars: 643 days, 2 hours, 30 minutes, 44 seconds Time to Mars: 373 days, 9 hours, 32 minutes, 45 seconds Time to Mars: 178 days, 2 hours, 58 minutes, 16 seconds Time to Mars: 171 days, 14 hours, 12 minutes, 7 seconds Time to Mars: 242 days, 21 hours, 26 minutes, 49 seconds Time to Mars: 93 days, 12 hours, 49 minutes, 51 seconds Time to Mars: 741 days, 9 hours, 16 minutes, 36 seconds Time to Mars: 69 days, 14 hours, 40 minutes, 4 seconds Lab2D - Notepad File Edit Format View Help 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!