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
//answer:% is a remainder operator, it calculates left over seconds when movie length is divided into full minutes
22
+
//answer:% is a remainder operator, it calculates left over seconds when movie length is divided into full minutes
23
+
21
24
// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
22
25
//answer:it subtracts the left over seconds from the total movie length to get a multiple of 60, then divides by 60 to convert that duration into whole minutes.
26
+
23
27
// e) What do you think the variable result represents? Can you think of a better name for this variable?
24
-
//answer: formatted movieLength, it represents the movieLength format as a time string
28
+
//answer: formattedMovieLength, it represents the movieLength format as a time string
29
+
25
30
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
26
-
//answer: yes it can work but only for positive numbers representing total seconds, if the movieLength is negative it will give off an output of an invalid time value
31
+
//answer: yes it can work but only for positive numbers representing total seconds, if the movieLength is negative it will give off an output of an invalid time value
0 commit comments