Cape Town | 26-ITP-Sept | Leigh Ross | Sprint 2 | Complete Sprint 2 Coursework - #1557
leigh-ross wants to merge 32 commits into
Conversation
…odule-JavaScript-Fundamentals into coursework/sprint-2 "Trying to fix my commits"
✅ 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.
|
Thanks for working through this. I can see you’ve completed a lot of the exercises and added explanations, which is a good start. I don’t think this is ready to merge yet though. A few of the submitted solutions are still broken or incomplete, and I’d recommend fixing these before this gets marked complete. Sprint-2/3-mandatory-interpret/1-percentage-change.js The replaceAll calls are malformed: The directory logic is incorrect: This appears to be an accidental change rather than a valid solution to the original task I’d suggest: fixing the syntax issues first, Overall, the work is close, but I’d want these issues resolved before approval. |
Thank you so much for your feed back. Looking forward to my next review. |
|
@valentina-starr1 Have you completed this form to join CYF Org / ITP Volunteers GitHub team so that you could use labels to indicate the status of an ITP PR in ITP? Note: In ITP, when a PR is approved, the PR won't be merged. Instead, we add a "Complete" label to the PR to indicate the PR is approved. |
|
@valentina-starr1 @cjyuan |
| // simple bodmas bro | ||
|
|
||
| // math.random = 2 | ||
| // num = 201 No newline at end of file |
There was a problem hiding this comment.
The description on line 12 is not precise enough, and the value of num is not exactly 201.
Could you give a precise description what each of these expressions does, and the range of the numbers it may produce?
Math.random()Math.random() * (maximum - minimum + 1)Math.floor(Math.random() * (maximum - minimum + 1))Math.floor(Math.random() * (maximum - minimum + 1)) + minimum
Note: To describe a range of numbers, we could use the concise and precise interval notation:
[,]=> inclusion(,)=> exclusion
For example,
$x$ is a number between 1 and 10, including 1 but excluding 10.
There was a problem hiding this comment.
My mistake, I understand now.
if min = 0 and max = 10
- Math.random() generates a number between [0,1).
Lets say it returns the number 0,22. - Multiply 0.22 by (10-0+1) = 2.42
- Next step allows us to round down to the nearest integer. =2
- This adds the minimum back in but in my example it returns the same answer.
this last step was to ensure the range looks like [min, max] inclusive.
There was a problem hiding this comment.
In the script, maximum and minimum are declared as
const minimum = 1;
const maximum = 100;
Could you describe the range of the numbers that Math.random() * (maximum - minimum + 1) can evaluate to?
|
Changes look good. I will mark this PR as Complete first. |

Learners, PR Template
Self checklist
Task code
CYF-1039
Changelist