Skip to content

Birmingham | 26-ITP-May |Gabriel Pawuoi | Sprint 1 | Fix median function - #1398

Open
KhotKeys wants to merge 1 commit into
CodeYourFuture:mainfrom
KhotKeys:median
Open

Birmingham | 26-ITP-May |Gabriel Pawuoi | Sprint 1 | Fix median function #1398
KhotKeys wants to merge 1 commit into
CodeYourFuture:mainfrom
KhotKeys:median

Conversation

@KhotKeys

@KhotKeys KhotKeys commented Aug 7, 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

Changelist

  • Fixed calculateMedian to sort a copy of the array without mutating the original.
  • Correctly handle even/odd length arrays.
  • Added handling for invalid inputs such as non-arrays, empty arrays, and arrays with non-numeric values mixed in.

@KhotKeys KhotKeys added 📅 Sprint 1 Assigned during Sprint 1 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 7, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi gabriel, I saw you made a lot of different PRs for this task. In Sprint 1 here, it's fine to combine them all into one. Can you do that? Thanks

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

Your PR couldn't be matched to an assignment in this module.

Please check its title is in the correct format, and that you only have one PR per assignment.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

1 similar comment
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

Your PR couldn't be matched to an assignment in this module.

Please check its title is in the correct format, and that you only have one PR per assignment.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@KhotKeys

KhotKeys commented Aug 8, 2026

Copy link
Copy Markdown
Author

Hi gabriel, I saw you made a lot of different PRs for this task. In Sprint 1 here, it's fine to combine them all into one. Can you do that? Thanks

I thought it would be easier for the quick review if it is one after the other, now, I will have to combine all and create a single PR, right?

@LonMcGregor

Copy link
Copy Markdown

For this task, having it all in one place is easier to review as it allows all the tests to be run at once. Yes, if you could put them together, that would be great

@KhotKeys

KhotKeys commented Aug 8, 2026

Copy link
Copy Markdown
Author

For this task, having it all in one place is easier to review as it allows all the tests to be run at once. Yes, if you could put them together, that would be great

I have combined, done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants