@@ -15,24 +15,43 @@ function formatTimeDisplay(seconds) {
1515 return `${ pad ( totalHours ) } :${ pad ( remainingMinutes ) } :${ pad ( remainingSeconds ) } ` ;
1616}
1717
18+
1819// You will need to play computer with this example - use the Python Visualiser https://pythontutor.com/visualize.html#mode=edit
1920// to help you answer these questions
2021
21- // Questions
22+ console . log ( formatTimeDisplay ( 61 ) ) ;
23+
24+
25+
26+
27+
28+ Questions
29+
30+ a ) When formatTimeDisplay is called how many times will pad be called ?
31+ 3 time .
32+
33+
34+ b ) What is the value assigned to num when pad is called for the first time ?
35+ = === === === === > parameter
36+
37+
38+
39+ c ) What is the return value of pad is called for the first time ?
40+ = === === === === > numString variable
41+
42+
43+
44+ d ) What is the value assigned to num when pad is called for the last time in this program ? Explain your answer
45+ === = === = === = =>
46+
2247
23- // a) When formatTimeDisplay is called how many times will pad be called?
24- // =============> write your answer here
2548
26- // Call formatTimeDisplay with an input of 61, now answer the following:
49+ e ) What is the return value of pad when it is called for the last time in this program ?
2750
28- // b) What is the value assigned to num when pad is called for the first time?
29- // =============> write your answer here
3051
31- // c) What is the return value of pad is called for the first time?
32- // =============> write your answer here
52+ The three functions of pad are called
53+ in three variables totalMinutes , remainingMinutes and totalHours .
54+ The last variable in the pad function is called remainingSeconds ;
3355
34- // d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
35- // =============> write your answer here
3656
37- // e) What is the return value of pad when it is called for the last time in this program? Explain your answer
38- // =============> write your answer here
57+ // =============>
0 commit comments