File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Sprint-2/4-mandatory-interpret Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -11,24 +11,24 @@ function formatTimeDisplay(seconds) {
11
11
return `${ pad ( totalHours ) } :${ pad ( remainingMinutes ) } :${ pad ( remainingSeconds ) } ` ;
12
12
}
13
13
14
- // You will need to play computer with this example - use the Python Visualiser https://pythontutor.com/visualize.html#mode=edit
14
+ // You will need to play computer with this example - use the Python Visualizer https://pythontutor.com/visualize.html#mode=edit
15
15
// to help you answer these questions
16
16
17
17
// Questions
18
18
19
19
// a) When formatTimeDisplay is called how many times will pad be called?
20
- // =============> write your answer here
20
+ // =============> Three times
21
21
22
22
// Call formatTimeDisplay with an input of 61, now answer the following:
23
23
24
24
// b) What is the value assigned to num when pad is called for the first time?
25
- // =============> write your answer here
25
+ // =============> 0
26
26
27
27
// c) What is the return value of pad is called for the first time?
28
- // =============> write your answer here
28
+ // =============> 00
29
29
30
30
// 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
+ // =============> 1 the last time when pad is called is pad(remainingSeconds) the remainder of 61/60 = 1 calculated in line 6
32
32
33
33
// 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
+ // =============> The return value assigned is 01, the remainder was 1 and pad function fill blanks with 0 to get 2 chars.
You can’t perform that action at this time.
0 commit comments