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]
3 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:
Volgvan3 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
While troubleshooting a network connection problem for a coworker, you discover the computer is querying a nonexistent DNS serve
tatuchka [14]

Answer:

nslookup ifconfig.

Explanation:

The nslookup is used a number of times by network admins to troubleshoot DNS related problems. In addition, this command finds IP addresses and name servers of hosts. This utility command queries the DNS database tables from every host in a network. It then determines the host name and issues an IP. It sort of converts your domain name into an IP addresses. This command combined with ifconfig finds the correct DNS servers and assigns the correct DNS server IP.

6 0
3 years ago
Who share the road with an impaired driver are at risk
bonufazy [111]
All drivers

All drivers who share the road with an impaired driver are at risk.
8 0
3 years ago
Read 2 more answers
Tfuuvj vjiibjoon Ghosh kpj
Nookie1986 [14]

Answer: A

Explanation: For any formal document you need your major points.

5 0
3 years ago
Read 2 more answers
For window 7 explain the steps you will use to find the available program you will list.
Alex_Xolod [135]
Follow these steps.
1. Make sure that your pc is on.
2. Press your Window key - on your bottom left of your keyboard you will see a window key. 
3. After pressing it will show a tab on your bottom left of your monitor.
4. On that tab you will see an (All Programs) text.
5. Click it and it will show all programs available on your pc.
8 0
3 years ago
When might an lcd monitor experience distorted geometry?
horsena [70]

The time when an LCD monitor is experiencing distorted geometry is when there is a presence of the screen into having a display that is not set on the resolution that is supposed to be in native, this is indicative that it is experiencing distorted geometry.

7 0
3 years ago
Other questions:
  • AYUDAAA..... DARÉ TODOS LOS PUNTOS QUE PUEDA.
    15·1 answer
  • . char values are surrounded by _____ quotes
    15·1 answer
  • Please help me please
    6·1 answer
  • How many generations of computer languages have there been since the middle of the 20th century?
    10·1 answer
  • Assume the availability of a function named oneMore. This function receives an integer and returns one more than its parameter.
    14·1 answer
  • Which descriptions offer examples of Correction Services workers? Select all that apply.
    8·1 answer
  • PLEASE HELP, Answer Correctly..Will give a bunch of brainlist points ​
    10·1 answer
  • ¿Qué ayuda nos proporcionan las herramientas tecnológicas en estos tiempo de pandemia? ayudaaaaa plis
    9·1 answer
  • A natural language processor reads the sentence The walk was tiring and mistakes the noun “walk” as a verb. What is such an erro
    13·1 answer
  • You are a software engineer at a company where management routinely encourages you and your colleagues to use pirated software.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!