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
// % is called remainder. There fore movieLength % 60 represents the remainder of the movie length after dividing by 60.
20
23
21
24
// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
25
+
// totalMinutes are calculated by subtracting the remaining seconds from movie length and divided by 60 to get full minutes. this helps to get a number which divided by 60 with out reminder.
22
26
23
27
// e) What do you think the variable result represents? Can you think of a better name for this variable?
28
+
// result represents the total length of the movie in the form of Hour: minute: second
29
+
// moveDurationFormatted can be a better name to replace result.
24
30
25
31
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
32
+
// Yes it works for all value. the only thing that is concerning is the validation of movieLength as the negative integer also gives value which is unrealistic.
0 commit comments