Skip to content

Commit 3178e15

Browse files
committed
Mandatory interpretation is done
I run the code in Python Visualiser and answered all the questions
1 parent 15d0324 commit 3178e15

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,22 @@ 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+
// =============> 3 Times
21+
pad(totalHours)
22+
pad(remainingMinutes)
23+
pad(remainingSeconds)
24+
2125

2226
// Call formatTimeDisplay with an input of 61, now answer the following:
2327

2428
// b) What is the value assigned to num when pad is called for the first time?
25-
// =============> write your answer here
29+
// =============> 0 first value is totalHours
2630

2731
// c) What is the return value of pad is called for the first time?
28-
// =============> write your answer here
32+
// =============> "00" because the target length is 2 digits
2933

3034
// 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
35+
// =============> 1 this is last value is remaining in Seconds
3236

3337
// 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
38+
// =============> 01 because the target length is 2 digits

0 commit comments

Comments
 (0)