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
16
// to help you answer these questions
16
17
17
18
// Questions
18
19
19
20
// a) When formatTimeDisplay is called how many times will pad be called?
20
-
// =============> write your answer here
21
+
// =============> Three time
21
22
22
23
// Call formatTimeDisplay with an input of 61, now answer the following:
23
24
24
25
// b) What is the value assigned to num when pad is called for the first time?
25
-
// =============> write your answer here
26
+
// =============> num =0
26
27
27
28
// c) What is the return value of pad is called for the first time?
28
-
// =============> write your answer here
29
+
// =============> return value='00'
29
30
30
31
// 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
32
+
// =============> num=1 because it will take the value of remainingseconda which is 1;
32
33
33
34
// 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
35
+
// =============> return value ='01' it will take number 1 then will convert to sting then it will add 0 to the first because it is only one character .
0 commit comments