answer.
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
Dimas [21]
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:
Art [367]2 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
Which of the following commands uses correct syntax for matching the patterns bunk or bank at the end of a line of text?
Alika [10]

Answer:

a. grep 'b[au]nk$' myLine

Explanation:

grep is a command used for searching a specified pattern in a given text.

Our goal is to match the character sequence - bank or bunk at the end of line in a  given line referenced by myLine.

The regular expression for the specified match criterion is:

b[au]nk$

The second character can be either a or u.

$ indicates match at end of line.

So the overall grep command is :

grep 'b[au]nk$' myLine

8 0
2 years ago
1. Show that the three security services-confidentiality, integrity, and availabilty- are sufficient to deal with the threats of
nika2105 [10]

Answer:

Answer explained below

Explanation:

1. confidentiality prevents disclosure,availability prevents disruption,integrity prevents accepting wrong data. availability and integrity will prevent disruption. the possessed data if wrongly held then its availability is affected. if actual data is impersonated then integrity is affected.

2. computers are invented by humans. they are programmed by humans. humans may tend to make mistakes and may fail to take care of all real-time possibilities. hence may not be perfectly secure

3.a. o-->owner r-->read w-->write x-->execute

                                             alicerc babrc cyndyrc

      alice                           ox  

      bob                                   rr  

      cyndy

3b                                          alicerc babrc cyndyrc

      alice                                  ox              r            r

      bob                                                     ox  

     cyndy                                  r                rw           orwx  

4. Integrity means that information is correct, and that data has not been corrupted in any way. integrity ensures that information has not been compromised, that the information is valid and is a result of authenticated and controlled activities. If we don’t have any way to confirm and ensure that this is true, we can’t guarantee confidentiality.

5.a.discretionary access control

Since users can assign and modify permissions that they possess, access control is discretionary.

5.b.originator access control

This would be originator access control. This is because if I am the author of the memorandum I am

the one who can say my information can be distributed, no one else can.

5.c.mandatory access control

The system controls access and an individual cannot change that. There is a somewhat tricky scenario

though that could possibly make this discretionary; if there is an owner of the 'military facility' and this person also had the ability to promote military personnel to 'general'. In this way the facility owner could grant access to their facility.

6 0
2 years ago
Describe copyright statute, disclaimers, and filing procedures.
gayaneshka [121]

Answer:(Answers may vary.)

I researched about different concepts regarding statute of limitations, disclaimers, and filing procedures regarding copyright issues.

Statute of limitations

Statute of limitations for copyright falls under two categories. The first is a limitation for ‘Criminal Proceedings’. In this case, the statute stands that the claim (or lawsuit) has to be filed within five years of the cause (act of infringement). The second consideration is in the ‘Civil Action’ case. Here the claim (lawsuit) has to be filed within three years of the cause. Many times the last act of infringement is taken as the date from which these five (or three) years are calculated. There have been cases where the date when the infringement was discovered by the victim, is taken as a starting date.

Disclaimers

A disclaimer is a statement that is intended to pass on some information about the content of the design to the viewer. This disclaimer may be to signify the intent of the designer behind the content. It may also be a suggestion or warning to ensure the viewer uses discretion while viewing the content. A disclaimer is mutual understanding between the designer and viewer. This would protect the designer rights in a situation where the viewer claims damages after the viewer clearly disregarded the disclaimer.

Filing procedures

A claim for copyright has to be filed (ideally) before any infringement occurs, or within three months of the infringement. Timely registration would help the claim for damages. I can file for a copyright online (U.S. Copyright Office). I can also file for a copyright in printed form at the U.S. Copyright Office. I would need two copies of my work at the time of filing. The online facility is charged (fees) lesser than direct submission. I would have to sure which form I fill, as all the forms refer to different types of work.

Explanation: I just did it and it showed me.

7 0
2 years ago
The height of a small rocket y can be calculated as a function of time after blastoff with the following piecewise function: y 5
SOVA2 [1]

Answer:

High level Language

understand

Explanation:

rocket is 0...4433456u888

5 0
1 year ago
#A year is considered a leap year if it abides by the #following rules: # # - Every 4th year IS a leap year, EXCEPT... # - Every
lara [203]

Answer:

To check if the year comes under each 100th year, lets check if the remainder when dividing with 100 is 0 or not.

Similarly check for 400th year and multiple 0f 4. The following C program describes the function.

#include<stdio.h>

#include<stdbool.h>

bool is_leap_year(int year);

void main()

{

int y;

bool b;

 

printf("Enter the year in yyyy format: e.g. 1999 \n");

scanf("%d", &y);     // taking the input year in yyyy format.

 

b= is_leap_year(y);  //calling the function and returning the output to b

if(b==true)

{

 printf("Thae given year is a leap year \n");

}

else

{

 printf("The given year is not a leap year \n");

}

}

bool is_leap_year(int year)

{

if(year%100==0)   //every 100th year

{

 if(year%400==0)   //every 400th year

 {

  return true;

 }

 else

 {

  return false;

 }

}

if(year%4==0)  //is a multiple of 4

{

 return true;

}

else

{

 return false;

}

}

Explanation:

Output is given as image

5 0
2 years ago
Other questions:
  • Email, instant messaging and most web traffic go across the internet in the clear; that is, anyone who can capture that informat
    15·2 answers
  • When driving, your attention is __________.
    5·2 answers
  • During which phase of web publishing would you use a text editor to enter codes that instruct the browser how to display webpage
    5·1 answer
  • Someone else can drive your car if _____.
    12·2 answers
  • An electronics store purchased a CD player at a wholesale price of $60 and then sold it at a 40 percent discount off the origina
    13·1 answer
  • What three requirements are defined by the protocols used in network communications to allow message transmission across a netwo
    11·1 answer
  • Budget Analysis (use while loop) Write a program that asks the user to enter the amount that he or she has budgeted for a month.
    5·1 answer
  • Wendy is an attacker who recently gained access to a vulnerable web server running Microsoft Windows. What command can she use t
    9·1 answer
  • Write a recursive method called printNumPattern() to output the following number pattern. Given a positive integer as input (Ex:
    5·1 answer
  • When considering server consolidation, plan on running ___________ vCPUs per core.a. 1 to 2b. 3 to 4c. 4 to 6d. 6 to 8
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!