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
// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
26
+
//First, it takes away the extra seconds that don't make up a full minute.
27
+
// Then it divides the remaining seconds by 60 to figure out how many complete minutes are in the movie.
22
28
23
29
// e) What do you think the variable result represents? Can you think of a better name for this variable?
30
+
// formattedTime
24
31
25
32
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
33
+
// Yes but not all ,because It handles converting seconds into minutes and hours using integer division and modulus.But with negative integers dose not work correcly
34
+
//And does not pad single-digit values with zeroes as wll, It will return something like 2:4:7 instead of 02:04:07, which is not a standard time format.
0 commit comments