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
// iii) the % is a remainder operator telling us how many remaining seconds are left in the variable decleration in line 1
20
23
21
24
// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
25
+
// iv) line 4 is taking the movieLength 8784 - remainingSeconds 24 which leaves us with a whole value of 146 for the totalMinutes variable decleration.
22
26
23
27
// e) What do you think the variable result represents? Can you think of a better name for this variable?
28
+
// v) It represents the total time remaining in HH:MM:SS format, perhaps changing variable decleration to timeRemainingHHMMSS would be more descriptive in what we are trying to achieve?
24
29
25
30
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
31
+
// vi) this code won't work for negative number values and non-numeric values, I noticed that single-digit values don't follow the HHMMSS it shows HMSS depending on the value input used such as movieLength = 52.
0 commit comments