Skip to content

Commit f813ae6

Browse files
committed
I answered all the questions and python visualiser helped me answer these questions.
1 parent 7a09127 commit f813ae6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sprint-2/4-mandatory-interpret/time-format.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ function formatTimeDisplay(seconds) {
1717
// Questions
1818

1919
// a) When formatTimeDisplay is called how many times will pad be called?
20-
// =============> write your answer here
20+
// =============> write your answer here: When formatTimeDisplay is called four times pad will be called, one for remainingSeconds, one for remainingMinutes, one for totalMinutes and one for totalHours.
2121

2222
// Call formatTimeDisplay with an input of 61, now answer the following:
2323

2424
// b) What is the value assigned to num when pad is called for the first time?
25-
// =============> write your answer here
25+
// =============> write your answer here: When pad is called for thee first time, num will be assigned the value of 1, which is the value of remainingSeconds.
2626

2727
// c) What is the return value of pad is called for the first time?
28-
// =============> write your answer here
28+
// =============> write your answer here: The return value of pad when called for the first time will be `01` because it pads the number 1 with a leading zero to make it two digits.
2929

3030
// d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
31-
// =============> write your answer here
31+
// =============> write your answer here: When pad is called for the last time, num will be assigned the value of 0, which is the value of totalHours.
3232

3333
// e) What is the return value assigned to num when pad is called for the last time in this program? Explain your answer
34-
// =============> write your answer here
34+
// =============> write your answer here: when pad is called for the last time, the return value will be `0` because it pads the number 0 with a leading zero to make it two digits.

0 commit comments

Comments
 (0)