CApe Town | May -ITP-26| Enice Mutanda|Sprint 1|Coursework#1386
CApe Town | May -ITP-26| Enice Mutanda|Sprint 1|Coursework#1386Enice-Codes wants to merge 6 commits into
Conversation
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.
331a9b4 to
c8de3b5
Compare
c8de3b5 to
49f8a23
Compare
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.
1 similar comment
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.
Good work on the stretch explore tasks.
I've left some comments for you to follow up with the interpreting tasks
| // Read the code and then answer the questions below | ||
|
|
||
| // a) How many function calls are there in this file? Write down all the lines where a function call is made | ||
| //one function call in line 4 ,5 |
There was a problem hiding this comment.
I think there are a few more function calls to find
| // e) What do you think the variable result represents? Can you think of a better name for this variable? | ||
|
|
||
| // the variable result represents the total length of the movie in hours and minutes. | ||
| //Better name is MOvieTime. |
There was a problem hiding this comment.
Does the name movieTime give a good idea of how this new variable is different to the original movieLenght?
There was a problem hiding this comment.
I thought movieTime best described the function expression. However, it didn't seem different enough from the original variable name movieLength, so I renamed it movieLengthTime to make the distinction clearer.
| //Better name is MOvieTime. | ||
| // f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer | ||
| // Yes, this code will work for all values because it is using the modulus operator to calculate the remaining seconds and is using division to calculate the total hours. | ||
| // The code will correctly handle any length of movie in seconds and convert it to the appropriate format. |
There was a problem hiding this comment.
It may run without any errors, but does it always end up in the correct format? Are there any edge cases?
Self checklist
Changelist
identified and correct errors
interpreted javascript
evaluated expressions
used Dev tools to answer the questions based on excercise