Skip to content

Manchester | 26-ITP-Sep | Mathew Shaibu | Sprint 2 | Coursework/sprint 2 implement and rewrite - #1673

Open
MattCarolus10 wants to merge 107 commits into
CodeYourFuture:mainfrom
MattCarolus10:coursework/sprint-3-implement-and-rewrite
Open

MattCarolus10 wants to merge 107 commits into
CodeYourFuture:mainfrom
MattCarolus10:coursework/sprint-3-implement-and-rewrite

Conversation

@MattCarolus10

@MattCarolus10 MattCarolus10 commented Oct 10, 2026 •

Copy link
Copy Markdown

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-1059

Changelist

-implement isValidPassword function with checks for length, previous passwords array, uppercase, lowercase, numbers, and allowed symbols

  • add unit tests covering each password validation rule using jest
  • ensure test cases use fully compliant passwords so all individual rule assertions pass

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@MattCarolus10 MattCarolus10 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 10, 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 Oct 10, 2026
@MattCarolus10 MattCarolus10 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 10, 2026
@MattCarolus10 MattCarolus10 changed the title Manchester | 26-ITP-Sep | Mathew Shaibu | Sprint 3 | Coursework/sprint 3 implement and rewrite Manchester | 26-ITP-Sep | Mathew Shaibu | Sprint 2 | Coursework/sprint 2 implement and rewrite Oct 10, 2026
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Oct 14, 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.

Good start, though I see some areas to improve further


export function isProperFraction(numerator, denominator) {
// TODO: Implement this function
if (numerator < denominator) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A couple of issues with this sequence of if statements:

  1. It seems rather complex, is there a way to simplify what the concept of a "proper fraction" is?
  2. An if statement has a boolean condition. You are always returning booleans. Are the if statements needed at all in this case?

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.

Thank you, that makes total sense. i will simplify it by returning Math.abs(numerator) < Math.abs(denominator) directly without if statements.

});

test(`Should return false when denominator is negative`, () => {
expect(isProperFraction(1, -2)).toEqual(false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A fraction is proper when the number on top is smaller than the number on bottom. Even though 2 is negative, the size of 1 is smaller than 2 so fractions like -1/2 and 1/-2 are valid proper fractions

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.

Thank you so much, I have corrected it.

@LonMcGregor LonMcGregor 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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Oct 14, 2026
@MattCarolus10 MattCarolus10 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 14, 2026
@LonMcGregor

Copy link
Copy Markdown

Great, this looks good now

@LonMcGregor LonMcGregor 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 Oct 16, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants