Cape Town | 26-ITP-Sep | Raees Stevens | Sprint 2 | Coursework/sprint 2 - #1640
RaeesStevens wants to merge 40 commits into
Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cjyuan
left a comment
There was a problem hiding this comment.
Previously, the validation bot removed the "Needs review" label from this PR because it detected that the PR branch did not follow the CYF convention. Once the PR branch was fixed, the "Needs review" label should have been added again.
Please note that in ITP, trainees need to ensure their PR has the "Needs review" label whenever they expect the PR to be reviewed.
| // Line 1 is a variable declaration, creating the count variable with an initial value of 0 | ||
| // Describe what line 3 is doing, in particular focus on what = is doing | ||
|
|
||
| // = in line 3 is assigning the rule that counting must start at 0. No newline at end of file |
There was a problem hiding this comment.
Line 3 does not enforce any "rule that counting must start at 0".
Could you rephrase the description?
| console.log(num); | ||
|
|
||
| // num represents any randomly generated number between 1 and 100. | ||
| // Math.random pulls a random decimal, Math.floor rounds down to nearest whole number, (maximum - minimum + 1) sets the range, adding the minimum of 1 at the end allows for the possibility of a random number being 100 instead of 99. No newline at end of file |
There was a problem hiding this comment.
What is the range of the random numbers returned by Math.random()?
There was a problem hiding this comment.
Math.random() cannot return 100.
There was a problem hiding this comment.
Apologies, was multi-tasking when I replied. Math.random() range will be 0 - 99. The range of num is 100.
There was a problem hiding this comment.
I don't think Math.random() can return 50 or 99 either.
|
Changes to the code look good. The answer to the question in this comment is still not correct. |

Self Checklist
Task code
CYF-1039
Changelist
Completed Sprint 2 coursework