Skip to content

Cape Town | 26-ITP-May | Shafiek Walker | Sprint 3 | Implement and Rewrite Tests#1390

Open
shafiekwalker7861 wants to merge 3 commits into
CodeYourFuture:mainfrom
shafiekwalker7861:coursework/sprint-3-implement
Open

Cape Town | 26-ITP-May | Shafiek Walker | Sprint 3 | Implement and Rewrite Tests#1390
shafiekwalker7861 wants to merge 3 commits into
CodeYourFuture:mainfrom
shafiekwalker7861:coursework/sprint-3-implement

Conversation

@shafiekwalker7861

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 3 "Implement and Rewrite Tests" exercises.
Implemented the required functions, rewrote the tests where needed, and verified that all tests pass using npm test.

@shafiekwalker7861 shafiekwalker7861 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. labels Jun 23, 2026
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jun 29, 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 on this task, I've left a few pointing questions to help you improve your solutions

function isProperFraction(numerator, denominator) {
// TODO: Implement this function
if ( numerator < denominator && numerator > 0 && denominator > 0) {
return true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Here you are returning true or false depending on the condition in your if statement. Is there a way you could simplify this?

Also, does it work for negative numerators?


function getCardValue(card) {
// TODO: Implement this function
if (card === "A♠" || card === "A♥" || card === "A♦" || card === "A♣") {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is there a way you could simplify this code so you avoid having 4 conditions for every single card type?

@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 Jun 29, 2026
@shafiekwalker7861 shafiekwalker7861 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 30, 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.

Great work, these tasks are complete. Combining your fraction conditions into a single return value separated by ANDs is a good simplification.

@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 Jul 1, 2026
@shafiekwalker7861

shafiekwalker7861 commented Jul 1, 2026 via email

Copy link
Copy Markdown
Author

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. Module-Structuring-And-Testing-Data The name of the module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants