Question: Python In order to build a space communication system we need to be able to calculate distances between planets and stars, and time intervals required

Python

In order to build a space communication system we need to be able to calculate distances between planets and stars, and time intervals required for transmissions. Our communication is done with electromagnetic waves that travel at the speed of light. One unit for measuring distances is the light-year, the distance traveled by light in one year. But how many days are there in one year? There are several possible interpretations. We adopt the definition of a sidereal year. The sidereal year is the time for the Sun to return to the same position in respect to the stars of the celestial sphere. The sidereal year is the orbital period of Earth and consists of 365.26 days. Implement a function that converts a given number of sidereal years into seconds, knowing that there are 365.26 days in a sidereal year. The program a1q5.py should read a number of second from the keyboard; call the function to converts it into seconds, and display the result. b) A light-second is the distance traveled by light in one second. Write a function to convert a given number of light-seconds into kilometers, knowing that the speed of light is about 300,000 kilometers/second. Expend your program a1q5.py to transform the number of second calculates in part a) into a distance by using your new function, and to display the result. c) Using your functions from a) and b), implement a function to find the distance (in kilometers) traveled by a communication signal from one star to another via Earth. Your program a1q5.py should be extended to ask the user to input the distances between each star and Earth (in light-years), call the function and display the result.

Example: Input a number of light-years: 7 The number of seconds is 220909248.0 The distance is 66272774400000.0 km. Input the distance to the first star, in light years: 0.5 Input the distance to the second star, in light years: 1.2 The distance between the two stars is 16094816640000.0 km

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!