Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To establish useful interstellar communications, we must calculate the distances between planets and stars involved and take planets and stars involved and take into account

To establish useful interstellar communications, we must calculate the distances between planets and stars involved and take planets and stars involved and take into account the various transmission times. Our communications are done by electromagnetic waves that travel at the speed of light. You have probably heard of the concept of light year, which measures the distance travelled by light during one year. But just how many days are there in a year? There are in fact several interpretations, but we will adopt the sidereal year, which represents the orbital period of the Earth and is equivalent to 365.26 days. Establish a simple Python function to convert a given number of sidereal years (light years) to seconds, knowing that there are 365.26 days in a sidereal year. The program d1q5.py must read an input value from the keyboard (the number of sidereal years), call the function to convert to seconds, and print the result.

b) A light-second is the distance light travels in one second. Write a Python function that will convert a given number of light-seconds to kilometers, knowing that the speed of light is speed of light is about 300,000 kilometers per second. Add to the program d1q5.py a call to the new function with the number of seconds calculated in question a), and print the result.

c) Using (calling) the functions in questions a) and b), write a function to find the distance (in kilometers) traveled by a communication signal between two stars via Earth (giving the sum of the distance from the first star to Earth and the distance from the second star to the Earth, in km). The distances between each star and the Earth are given in light years. Add instructions to the program d1q5.py to read the two distances from the keyboard, call the new function, and print the result.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions