Manchester | May-2026-ITP | Monsur Abdulrahman | Sprint 1 | Coursework Exercises#1334
Manchester | May-2026-ITP | Monsur Abdulrahman | Sprint 1 | Coursework Exercises#1334Monsur0001 wants to merge 16 commits into
Conversation
…s in random number generation
…ation of cardNumber
…, variable reassignment, and expression purpose in 1-percentage-change.js
…, and expressions in 2-time-format.js
…version process in 3-to-pounds.js
LonMcGregor
left a comment
There was a problem hiding this comment.
Good work, some changes needed, see my comments.
Good work doing the stretch tasks!
| // It will help to think about the order in which expressions are evaluated | ||
| // Try logging the value of num and running the program several times to build an idea of what the program is doing | ||
|
|
||
| console.log(num); |
There was a problem hiding this comment.
Good break down of the individual steps. Can you give a short explanation of what the script does overall?
There was a problem hiding this comment.
Thank you so much for taking time to review my work. Below is the explanation of what the script does as requested.
The script generates a random whole number between 1 and 100, and then stores it in the variable num. It uses Math.random() to produce a random decimal number, make it to the desired range and converts it into a whole number with Math.floor(), and adjusts the results so that the minimum value is 1 and the maximum is 100. Each time the program runs, a different number is likely to be generated
| 2. Number(carPrice.replaceAll(",", "")) | ||
| 3. priceAfterOneYear.replaceAll("," "") | ||
| 4. Number(priceAfterOneYear.replaceAll("," "")) | ||
|
|
There was a problem hiding this comment.
Good work finding these, I think there is one more function call to find
There was a problem hiding this comment.
Thank you for taking time to review my work, I appreciate that.
I later found out the there is one function call i didnt include which is "console.log"
Thank you so much
|
I addressed the issue raised by the reviewer |
Learners, PR Template
Self checklist
Changelist
I have done all the required tasks in Sprint 1