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
velikii [3]
3 years ago
7

Complete the function ending_time that determines the final clock time after a task has been completed. The function takes three

arguments that provide the current time of day, as well as the total time in seconds that it will take to complete the task: hour: the current hour of the day (0 - 23) minute: the current minute of the day (0 - 59) second: the current second of the day (0 - 59) time_taken: the number of seconds it will take to complete the task (greater than 0) Assume all inputs are valid. time_taken can be arbitrarily large! As an example, consider the test case: 2, 59, 40, 22. This means that the current hour is 2, the current minute is 59, the current second is 40, and the time to complete the task is 22 seconds. So the first three function arguments represent the time 2:59:40 am.
Computers and Technology
1 answer:
Ivanshal [37]3 years ago
8 0

Answer:

  1. def ending_time(hour, minutes, seconds, work_time):
  2.    if((seconds + work_time) // 60 > 0):
  3.        minutes = minutes + (seconds + work_time) // 60
  4.        seconds = (seconds + work_time) % 60    
  5.        if(minutes // 60 > 0):
  6.            hour = hour + (minutes // 60)
  7.            minutes = minutes % 60
  8.    else:
  9.        seconds = seconds + work_time  
  10.    return str(hour) + ":" + str(minutes) + ":" + str(seconds)
  11. print(ending_time(2,30,59, 12000))

Explanation:

The solution code is written in Python 3.

Firstly create a function ending_time that takes the four required input parameters.

Next, create an if statement to check if the numerator of (seconds + work_times) divided by 60 is over zero. If so, increment the minute and reassign the remainder of the seconds to the variable (Line 2-4).

Next, create another if statement again to check if the numerator of (current minutes) divided by 60 is over zero, if so increment the hour and reassign the remainder of the minutes to the variable (Line 6-8)

Otherwise, just simply add the work_time to the current seconds

At last return the time output string (Line 12).

You might be interested in
Why do we use the internet so much?​
allochka39001 [22]

Answer:

We use the internet because it is a way of finding certain things out that we do not know or a better way of communicating to people who are far away instead of sending a letter to them and it taking 2 to 3 months for it to get to that person.

Explanation:

Your welcome

4 0
2 years ago
Which of the following recommendations should you follow when placing access points to provide wireless access for users within
Colt1911 [192]

A WLAN, or wireless local area network, is created by an access point, typically in an office or big building. An access point transmits a Wi-Fi signal to a predetermined region after connecting via an Ethernet cable to a wired router, switch, or hub. Thus, option C is correct.

<h3>What access points to provide wireless access for users?</h3>

You may determine your wireless access point IP address by going to the settings menu of your adapter if you're already connected to the network via Wi-Fi or Ethernet.

Therefore, Open Network & Internet settings can be accessed by selecting with the right mouse click on the network icon in the system tray.

Learn more about wireless access here:

brainly.com/question/13073711

#SPJ1

6 0
1 year ago
What isthe concept of packets, give example?
Oduvanchick [21]

Answer: Packets are the small unit of data that is sent from source to destination on a network.

Explanation: Packets are small packages that carry data in a packet form and is used from transferring it on internet or any kind of packet-switched network. They use the internet protocol (IP) for the transmission of data.

Example: packet radio is a sort of digital radio that uses the packet for transmission of data to other nodes by utilizing the AX-25 protocol.

6 0
2 years ago
Describing Work Styles for Farmworkers and Laborers, Crop
Olegator [25]

Answer:

it is A,B,E,F,G

Explanation:

can i have brainliest please.

7 0
2 years ago
Read 2 more answers
25 POINTS!!!!!!!!!!!!!
Paladinen [302]
A leaking data exhaust
7 0
2 years ago
Read 2 more answers
Other questions:
  • Help !!!!!
    9·1 answer
  • Henrietta, the owner of a very successful hotel chain in the Southeast, is exploring the possibility of expanding the chain into
    15·1 answer
  • The electric company gives a discount on electricity based upon usage. The normal rate is $.60 per Kilowatt Hour (KWH). If the n
    7·1 answer
  • When you use an external style sheet with an HTML document, you get all but one of the benefits that follows. Which one is NOT a
    15·1 answer
  • For this exercise, you'll use the Rectangle class below (you can assume that the length and width are measured in feet).
    12·1 answer
  • What is emerging as a major business area of innovation that offers a flexible collection of computers on the internet that can
    6·1 answer
  • Where is information stored in the computer?​
    9·1 answer
  • Today's manufacturing workplace is most likely to include
    8·1 answer
  • A construction-based client would like to develop an application that can analyze an image of machinery and overlay information
    8·1 answer
  • Which of the following is not a component of Power BI?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!