Skip to content

Sheffield | 26-ITP-jan | Richard Frimpong | Sprint 1 | Data Groups Fix#1002

Closed
Richiealx wants to merge 1 commit intoCodeYourFuture:mainfrom
Richiealx:coursework/sprint-1-fix
Closed

Sheffield | 26-ITP-jan | Richard Frimpong | Sprint 1 | Data Groups Fix#1002
Richiealx wants to merge 1 commit intoCodeYourFuture:mainfrom
Richiealx:coursework/sprint-1-fix

Conversation

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

Completed the Sprint 1 - Fix exercise for the Data Groups module.

Fix: calculateMedian

Fixed the implementation of the calculateMedian function in:

Improvements made

  • Ensured the function correctly calculates the median value of an array
  • Handles both odd and even length arrays
  • Filters out non-numeric values
  • Returns null when no numeric values are present
  • Avoids mutating the original input array
  • Ensures compatibility with the existing Jest tests

Testing

All tests were run locally using:

cd Sprint-1
npm test -- fix

Result:

All tests passed successfully.

@Richiealx Richiealx added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 13, 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 Mar 13, 2026
@github-actions

This comment has been minimized.

@Richiealx Richiealx changed the title Sheffield | 26-ITP-jan | Richard Frimpong | Sprint 1 | Data Groups | Fix Sheffield | 26-ITP-jan | Richard Frimpong | Sprint 1 | Data Groups Fix Mar 13, 2026
@Richiealx Richiealx added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 13, 2026
@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 18, 2026
@github-actions
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.

@Richiealx Richiealx closed this Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants