Skip to content

Commit 294f0f5

Browse files
explain the percentage meaning
1 parent c32753d commit 294f0f5

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎Sprint-2/3-mandatory-interpret/2-time-format.js‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,23 @@ console.log(result);
1313

1414
// a) How many variable declarations are there in this program?
1515
/* line 1 const movieLength line 3 const remainingSeconds line 4 const totalMinutes
16-
line 6 const remainingMinutes line 7 const totalHours line 9 const result
16+
line 6 const remainingMinutes line 7 const totalHours line 9 const result*/
1717

1818
// b) How many function calls are there?
1919
/* there are one function
20-
console.log(result);
20+
console.log(result);*/
2121

2222
// c) Using documentation, explain what the expression movieLength % 60 represents
2323
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators
24-
/*The remainder (%) operator returns the remainder left over when one operand is divided by a second operand. It always takes the sign of the dividend.
24+
/*The remainder (%) operator returns the remainder left over when one operand is divided by a second operand. It always takes the sign of the dividend*/
2525

2626
// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
27-
/* This expression convert movies time second into minutes dividend by 60 second.
27+
/* This expression convert movies time second into minutes dividend by 60 second*/
2828

2929
// e) What do you think the variable result represents? Can you think of a better name for this variable?
3030
/* The variable represent the movieLength in second,minutes and hours.
31-
We can change this name as movieTime.
31+
We can change this name as movieTime*/
3232

3333
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
34-
/* In this section we can only use the positive natural numbers but if we put numbers that divide by 60 without a remainder get the exact time like 10, 20 50.
34+
/* In this section we can only use the positive natural numbers but if we put numbers that divide by 60 without a remainder get the exact time like 10, 20 50 */
35+
/*"Percent (%) is a way to describe the full amount of anything by imagining it split into 100 equal sections.*/

0 commit comments

Comments
 (0)