1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sergey [27]
2 years ago
14

Light travels at 3 × 108 meters per second. A light-year is the distance a light beam travels in one year.Write a PYTHON program

that calculates and displays the value of a light-year.Useful facts:Seconds in a year = 365×24×602Rate = 3×108meters per second
Computers and Technology
1 answer:
Volgvan2 years ago
4 0

Answer: This is a python code

def lightyear():

   rate=3*100000000   //speed of light

   seconds=365*24*60*60   //number of seconds in 1 year

   return str((rate*seconds)/1000)+" km"    //distance=speed x time

print(lightyear()) //will print value of light hear in kilometers

OUTPUT :

9460800000000.0 km

Explanation:

In the above code, there is a variable rate, which stores the speed of light, i.e. distance traveled by light in 1 second which is in meters. Another variable is seconds, which store the number of seconds in 1 year, which is no of days in 1 year multiplied by the number of hours in a day multiplied by the number of minutes in an hour multiplied by the number of seconds in a minute. Finally, distance is speed multiplied by time, so distance is printed in kilometers and to convert distance in kilometers it is divided by 1000.

You might be interested in
The element of website design that refers to the website's aesthetic appeal and the functional look and feel of the site's layou
zzz [600]

The element of website design that refers to the website's aesthetic appeal and the functional look and feel of the site's layout and visual design is known as context.

<h3>What is webpage context?</h3>

The web page context is known to be a kind of special ID that is is formed with all the new page load event.

The context of a website is known to be the point or place where a person can show their visitors that one care. It gives a kind of website's aesthetic appeal and the functional look.

Learn more about website design from

brainly.com/question/25941596

6 0
1 year ago
Why doesnt brainly let me skip by watching video?
oksian1 [2.3K]

What do you want to skip in brainly? There isn't anything to skip that I can think of.

4 0
3 years ago
Did it go from a sail boat to a row boat or vise versea
Bingel [31]
A sail boat went to a row boat.
8 0
3 years ago
Arpenet was the computer created by the military true or false
Sphinxa [80]

True. It was a project that the pentagon was working on in the 60's

3 0
3 years ago
Advanced word processing programs come with a number of built-in images known as
Elena L [17]

The answer is Clip Art

Clip art is a collection of pictures or images that are either built-in or can be imported into a document. These pictures may either be vector graphics or raster graphics. Clip art gallery is typically organized into categories such as objects, people, nature, and many more. They can be anywhere between a few images to thousands of them.

4 0
3 years ago
Other questions:
  • Many web browsers, including internet explorer, edge, chrome, and safari, have a(n) ____ option to browse the web without leavin
    12·2 answers
  • PLEASE HELP ITS DRIVERS ED
    8·2 answers
  • What does SIP stand for?
    5·2 answers
  • Which tasks can Kim complete using the Customize Ribbon dialog box? Check all that apply.
    14·1 answer
  • Describe how data center storage applications drive the development of SAN technology.
    8·1 answer
  • What can a scientist do if he repeats and experiment and gets diffrent results?
    5·1 answer
  • How does a sound card work?
    10·2 answers
  • host b is sending an email intented for the user on host a to the mail server what protocol is being used to send the message
    10·1 answer
  • Y'+2y = 5-e^(-4x), y(0)=-11
    9·1 answer
  • The term embedded system refers to any device that includes a computer chip, but that is not a general-purpose workstation, desk
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!