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
Goshia [24]
4 years ago
13

Use the get_seconds function to work out the amount of seconds in 2 hours and 30 minutes, then add this number to the amount of

seconds in 45 minutes and 15 seconds. Then print the result.
Computers and Technology
1 answer:
Andrej [43]4 years ago
5 0

Answer:

Since the get_seconds function is not given, I'll implement it myself;

The full program (get_seconds and main) written in python is as follows:

def  get_seconds(hour,minute,seconds):

    seconds = hour * 3600 + minute * 60 + seconds

    return seconds

time1 = get_seconds(2,30,0)

time2 = get_seconds(0,45,15)

result = time1 + time2

print(result)

Explanation:

<em>The get_seconds defines hour, minute and seconds as its arguments</em>

This line defines the get_seconds function

def  get_seconds(hour,minute,seconds):

This line calculates the second equivalent of the time passed to the function

    seconds = hour * 3600 + minute * 60 + seconds

This line returns the the calculated seconds equivalent of time

    return seconds

The main starts here

This line calculates the number of seconds in 2 hours and 30 minutes

time1 = get_seconds(2,30,0)

This line calculates the number of seconds in 45 minutes and 15 seconds

time2 = get_seconds(0,45,15)

This line adds both together

result = time1 + time2

This line prints the result

print(result)

You might be interested in
Write a function isCString which accepts as arguments a const pointer to a char array and an integer for the size of the array
Umnica [9.8K]

Answer:

Mnnmnkjhsgxlsjzgxfckabxvzuajs

7 0
3 years ago
What file formats can you safely use in a video presentation
dlinn [17]

i use fat 86 try it ok

7 0
3 years ago
Careers in information technology deal with
podryga [215]

Answer:

A

Explanation:

A would be the best possible answer

3 0
3 years ago
Read 2 more answers
Brian is a computer engineer who writes security software for a banking system. The
pashok25 [27]

Answer:

Programming & Software Development

Explanation:

Software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications.

Some of the models used in the software development life cycle (SDLC) are;

I. A waterfall model.

II. An incremental model.

III. A spiral model.

Also, programming refers to a software development process which typically involves writing the sets of instructions (codes) that are responsible for the proper functioning of a software.

In this scenario, Brian is a computer engineer who writes security software for a banking system.

Thus, the pathway in the Information Technology career cluster that Brian's job falls into is Programming & Software Development.

7 0
3 years ago
What is the output of the first and second print statements?
Alenkinab [10]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

 When you will run the given code of java in this question. You will get an error and nothing will get printed in the response of the result. Because, in Java, you can't add the two array objects. The reason behind it, java does not support operator overloading. You cannot use the plus operator to add two arrays in Java . It will give you the compile-time error.

There is a method to add two arrays in the Java program is to iterate over them and add individual elements and store them into a new array. This also becomes complex, if you having arrays of different sizes.  To go through this method, you have to build a method that will through an illegal exception in case of a mismatch in the sizes of the arrays.

As in the given code, when you execute the first print statement:

System.out.println(num1.get(0)+1);

It will produce error because first type is object and second is int. So, you cannot add object and int value.

When you will execute the given second print statement:

System.out.println(num1.get(1)+ num2.get(0));

it will also produce error, because you cannot add object in Java using + binary operator because in this statement first and second type are both objects.  

6 0
3 years ago
Other questions:
  • an organization that maintains a gateway to the Internet and rents access to customers on a per-use of subscription basis\ and W
    11·1 answer
  • In Windows 2000 and later, the ____ command shows you the file owner if you have multiple users on the system or network.
    15·1 answer
  • 1. _____ can’t be rewritten by the computer in which it’s installed, but it has the advantage of being very _____.
    6·1 answer
  • You will be given a value of n and k, one line each. You will write a program that determines the minimum number of probe attemp
    9·1 answer
  • Which type of development metrics does Instagram most improve when it releases an update in the App Store to fix errors its cust
    15·1 answer
  • What is a database backup, and how is it used?
    13·1 answer
  • If a computer truncatesall numbers to two decimal places, compute the error forthe following: 23.345+222.34911)0.12)0.01413)0.14
    15·1 answer
  • 4. You are planning to buy a new couch for your family room. Before you leave for the furniture store, you measure the available
    11·1 answer
  • Drag the tiles to the correct boxes to complete the pairs.
    13·1 answer
  • Use a while loop to output the even number from 100 to 147? This is python
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!