Skip to content

Cape Town | 26-ITP-Sept | Leigh Ross | Sprint 2 | Complete Sprint 2 Coursework - #1557

Open
leigh-ross wants to merge 32 commits into
CodeYourFuture:mainfrom
leigh-ross:coursework/sprint-2
Open

leigh-ross wants to merge 32 commits into
CodeYourFuture:mainfrom
leigh-ross:coursework/sprint-2

Conversation

@leigh-ross

@leigh-ross leigh-ross commented Sep 21, 2026 •

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Task code

CYF-1039

Changelist

  • Completed all Sprint 2 questions
  • Fixed broken code
  • Removed prep files from branch

@netlify

netlify Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit aa27b71
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/6abd9636422af600088229d3
😎 Deploy Preview https://deploy-preview-1557--cyf-onboarding-module.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
2 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 86 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

This comment has been minimized.

@leigh-ross leigh-ross added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 21, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 21, 2026
@leigh-ross leigh-ross added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 21, 2026
@valentina-starr1

valentina-starr1 commented Sep 21, 2026 •

Copy link
Copy Markdown

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:
replaceAll("," "") is missing a comma
this causes a syntax error and prevents the program from running
Sprint-2/1-key-exercises/3-paths.js

The directory logic is incorrect:
const dir = filePath.slice(base, -9); doesn’t correctly calculate the directory portion of the path
this should be derived from the file path structure rather than from the filename
Sprint-2/3-mandatory-interpret/2-time-format.js
The value of movieLength was changed from the original example value to 2, which changes the exercise context and output.

This appears to be an accidental change rather than a valid solution to the original task

I’d suggest:

fixing the syntax issues first,
re-running each exercise to confirm the outputs match the task requirements,
and checking that the final files are still aligned with the original instructions rather than leaving placeholder or experimental code in place.

Overall, the work is close, but I’d want these issues resolved before approval.

@leigh-ross

Copy link
Copy Markdown
Author

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: replaceAll("," "") is missing a comma this causes a syntax error and prevents the program from running Sprint-2/1-key-exercises/3-paths.js

The directory logic is incorrect: const dir = filePath.slice(base, -9); doesn’t correctly calculate the directory portion of the path this should be derived from the file path structure rather than from the filename Sprint-2/3-mandatory-interpret/2-time-format.js The value of movieLength was changed from the original example value to 2, which changes the exercise context and output.

This appears to be an accidental change rather than a valid solution to the original task

I’d suggest:

fixing the syntax issues first, re-running each exercise to confirm the outputs match the task requirements, and checking that the final files are still aligned with the original instructions rather than leaving placeholder or experimental code in place.

Overall, the work is close, but I’d want these issues resolved before approval.

Thank you so much for your feed back.
I have made the necessary adjustments.

Looking forward to my next review.

@cjyuan

cjyuan commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

@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.

@Luro91 Luro91 added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Sep 28, 2026
@leigh-ross leigh-ross added the 📅 Sprint 2 Assigned during Sprint 2 of this module label Sep 28, 2026
@leigh-ross

Copy link
Copy Markdown
Author

@valentina-starr1 @cjyuan
Hello, it has been a few days since the last review was made. I have made changes according to the feedback.
I am still waiting for my PR to be reviewed and marked as complete.
Please let me know what has to happen now.

Comment thread Sprint-2/1-key-exercises/4-random.js Outdated
// simple bodmas bro

// math.random = 2
// num = 201 No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

  1. Math.random()
  2. Math.random() * (maximum - minimum + 1)
  3. Math.floor(Math.random() * (maximum - minimum + 1))
  4. 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 in $[1, 10)$ means:

$x$ is a number between 1 and 10, including 1 but excluding 10.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My mistake, I understand now.
if min = 0 and max = 10

  1. Math.random() generates a number between [0,1).
    Lets say it returns the number 0,22.
  2. Multiply 0.22 by (10-0+1) = 2.42
  3. Next step allows us to round down to the nearest integer. =2
  4. 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.

@cjyuan cjyuan Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread Sprint-2/2-mandatory-errors/3.js
Comment thread Sprint-2/3-mandatory-interpret/1-percentage-change.js Outdated
Comment thread Sprint-2/4-stretch-explore/chrome.md Outdated
@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 30, 2026
@leigh-ross leigh-ross added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 30, 2026
@cjyuan

cjyuan commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Changes look good. I will mark this PR as Complete first.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants