Question: Could u write me a program in python with these requiremets instrutions Prompt the user for input Velocity as a % of the and

Could u write me a program in python with these requiremets instrutions
Prompt the user for input "Velocity as a % of the
" and accept the input as a float.
NOTE: Your program will need to do some middle
school math with the input. Basically, you are going to
get something like "50" entered, but that means 50%
of the speed of light equals velocity!
Prompt the user for the mass of the spaceship and accept the
input as a float.
Output the traveling mass of the spaceship.
Output the times (in light years) that the astronauts
experience as they travel to the following:
Alpha Centauri (which is 4.3 light years away);
Barnard's Star (which is 6.0 light years away);
Betelgeuse (which is 309 light years away); and
The Andromeda Galaxy (which is 2,000,000 light
years away).
All output should have 3 decimal place precision.
Constraints:
You must have at least one subroutine;
Your output must be exactly the same as the output of the
sample runs shown below for the specified user input;
You must comment your source code appropriately, include
an informative header at the top, and use good coding style;
You must use meaningful variable names;
When displaying output, use the string format() function
with string format specifiers.
Deliverable:
Turn in the Python file (.py) that has your code.
Hint:
There is a square root function in the Math library or you could
remember what x0.5 means.
Sample Output
Here is some sample output of various runs of a correct solution.
Note that values in bold red are those entered by the user:
Velocity as a % of the speed of light: 0
Mass of the spaceship at rest (kg): 70000
Mass of spaceship: 70000.000 kg
Time to travel to Alpha Centauri: 4.300
light years
Time to travel to Barnard's Star: 6.000
light years
Time to travel to Betelgeuse: 309.000 light
years
Time to travel to Andromeda Galaxy:
2000000.000 light years
Velocity as a % of the speed of light: 50
Mace nf tho cnarochin at roct (ker).7nnnn
Could u write me a program in python with these

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 Programming Questions!