West-Midlands |26-May-ITP |Maryam Janjua |Sprint 1 |Complete Sprint 1 Course Work#1409
West-Midlands |26-May-ITP |Maryam Janjua |Sprint 1 |Complete Sprint 1 Course Work#1409maryam-devio wants to merge 7 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
6 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
LonMcGregor
left a comment
There was a problem hiding this comment.
Well done doing the stretch tasks.
There's just one file I have comments about
| */ | ||
| // e) What do you think the variable result represents? Can you think of a better name for this variable? | ||
|
|
||
| // The result represents the how long the movie is, in hours, minutes and seconds. It can named as MovieDuration. |
There was a problem hiding this comment.
Does"MovieDuration" make enough of a distinction to the other variable name called "movieLength"?
There was a problem hiding this comment.
Thanks for the feedback. I agree that MovieDuration was too similar to movieLength, so I've renamed it to duration to make the distinction clearer.
| // The result represents the how long the movie is, in hours, minutes and seconds. It can named as MovieDuration. | ||
| // f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer | ||
| // Yes, I changed the value of movieLength and it worked. The movieLength is the variable used in calculating other | ||
| // values and to evaluate the total length of movie. No newline at end of file |
There was a problem hiding this comment.
It may work without errors, but are there any possible inputs where the output doesn't look quite right?
There was a problem hiding this comment.
Yes, I found that although the code worked without errors, the output was not always formatted correctly. For example, when the hours, minutes, or seconds were less than 10 (e.g. 7 or 5), they were displayed as single digits instead of two digits. I fixed this by adding a helper function that adds a leading zero to single-digit values before formatting the duration.
Thank you for your feedback.
Learners, PR Template
Self checklist
Changelist