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
{{ message }}
Repository navigation
Commit 48b94e2
Browse filesBrowse the repository at this point in the historyBrowse files
// Answer: The % symbol represent the remainder (modulo) operator, it calculates the leftover/remainder after integer division.
26
+
// Answer: % 60 divides the movieLength by 60 and returns only the remainder.
27
+
21
28
// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
22
29
30
+
// Answer: Line 4 expression helps to eliminate any remainder from the equation, so its left with a clean multiple of 60 to avoid any decimal
31
+
23
32
// e) What do you think the variable result represents? Can you think of a better name for this variable?
24
33
34
+
// Answer: It represent the total duration of the movie formatted into hours, minutes and seconds
35
+
// Answer: A better name could be "totalMovieDuration"
36
+
25
37
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
38
+
39
+
// Answer: It will work for integer values and will give us clear and clean result using this code. However, the result would not be clean as this using float values
0 commit comments