You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// You will need to play computer with this example - use the Python Visualiser https://pythontutor.com/visualize.html#mode=edit
15
20
// to help you answer these questions
16
21
17
22
// Questions
18
23
19
24
// a) When formatTimeDisplay is called how many times will pad be called?
20
25
// =============> write your answer here
26
+
// 3 times.
21
27
22
28
// Call formatTimeDisplay with an input of 61, now answer the following:
23
-
29
+
//
24
30
// b) What is the value assigned to num when pad is called for the first time?
25
-
// =============> write your answer here
31
+
// 0.
26
32
27
33
// c) What is the return value of pad is called for the first time?
28
-
// =============> write your answer here
34
+
// 00.
29
35
30
36
// 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
37
+
// 1, this is because they assign remainingSeconds to num for the last time pad is called.
32
38
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
39
+
// e) What is the return value assigned to num when pad is called for the last time in this program? Explain your answer - "do you mean the return value for pad?"
40
+
// 01, this is the result of calling pad for the last time.
0 commit comments