6 cells because you have to drag and it becomes six cells .
The highest amount is Credit. The more you wait the higher the interest, higher the interest the more you pay, and no one wants to play more. Stay safe use debit as much as you can
Answer:
- def ending_time(hour, minutes, seconds, work_time):
- if((seconds + work_time) // 60 > 0):
- minutes = minutes + (seconds + work_time) // 60
- seconds = (seconds + work_time) % 60
-
- if(minutes // 60 > 0):
- hour = hour + (minutes // 60)
- minutes = minutes % 60
- else:
- seconds = seconds + work_time
-
- return str(hour) + ":" + str(minutes) + ":" + str(seconds)
-
- 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).