File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Sprint-2/4-mandatory-interpret Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ function formatTimeDisplay(seconds) {
1111 return `${ pad ( totalHours ) } :${ pad ( remainingMinutes ) } :${ pad ( remainingSeconds ) } ` ;
1212}
1313
14+ const number = 61 ;
15+ console . log ( formatTimeDisplay ( number ) ) ;
16+
1417// You will need to play computer with this example - use the Python Visualiser https://pythontutor.com/visualize.html#mode=edit
1518// to help you answer these questions
1619
@@ -19,16 +22,26 @@ function formatTimeDisplay(seconds) {
1922// a) When formatTimeDisplay is called how many times will pad be called?
2023// =============> write your answer here
2124
25+ // 3 times
26+
2227// Call formatTimeDisplay with an input of 61, now answer the following:
2328
2429// b) What is the value assigned to num when pad is called for the first time?
2530// =============> write your answer here
2631
32+ // 0
33+
2734// c) What is the return value of pad is called for the first time?
2835// =============> write your answer here
2936
37+ // 00
38+
3039// d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
3140// =============> write your answer here
3241
42+ // 1
43+
3344// e) What is the return value assigned to num when pad is called for the last time in this program? Explain your answer
3445// =============> write your answer here
46+
47+ // 01
You can’t perform that action at this time.
0 commit comments