Skip to content

Sheffield | 26-Jan-ITP | Seti Mussa | Sprint 3 | coursework implement and rewrite #1276

Closed
Seti-Jemal wants to merge 10 commits intoCodeYourFuture:mainfrom
Seti-Jemal:coursework/sprint-3-implement-and-rewrite
Closed

Sheffield | 26-Jan-ITP | Seti Mussa | Sprint 3 | coursework implement and rewrite #1276
Seti-Jemal wants to merge 10 commits intoCodeYourFuture:mainfrom
Seti-Jemal:coursework/sprint-3-implement-and-rewrite

Conversation

@Seti-Jemal
Copy link

@Seti-Jemal Seti-Jemal commented Mar 20, 2026

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

I have completed the Sprint 3 implement and rewrite test

Questions

N/A

Implement the getAngleType function to classify angles and add tests for various cases.
Implemented the isProperFraction function to check if the numerator is less than the denominator. Added tests for various cases including proper fractions, improper fractions, and edge cases.
Implemented the getCardValue function to determine the value of a card based on its rank and suit. Added error handling for invalid cards and wrote initial test cases.
Fix typos in suit and rank validation checks, and correct error throwing.
@github-actions

This comment has been minimized.

@Seti-Jemal Seti-Jemal changed the title Sheffield | 26-Jan-ITP | Sprint 3 | coursework implement and rewrite Sheffield | 26-Jan-ITP | Seti Mussa | Sprint 3 | coursework implement and rewrite Mar 20, 2026
@github-actions

This comment has been minimized.

@Seti-Jemal Seti-Jemal added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 20, 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 20, 2026
@Seti-Jemal Seti-Jemal added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 20, 2026
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

This exercise has a 2nd part.
Can you also update the three files in Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest?

Comment on lines 17 to 36
function getAngleType(angle) {
// TODO: Implement this function
function getAngleType(angle) {
if (angle <= 0 || angle >= 360)
}

if (angle < 90) {
return "actue angle";
}
if (angle === 90) {
return "right angle";
}
if (angle < 180){
return "obtuse angle";
}
if (angle === 180){
return "straight angle";
}
if (angle < 360){
return "reflext angle";
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The file has syntax errors and the indentation is off. Can you fix them?

Comment on lines +14 to +18
if (numerator < denominator) {
return true;
} else {
return false;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment on lines +25 to 38
const rank = card.slice(0, -1);
const suit = card.slice(-1);

const vaildSuits = [""♠", "♥", "♦", "♣"];
const vailRanks = ["A","2","3","4","5","6","7","8","9","10","J","Q","k"];

if (!vaildSuits.includes) || !validRanks.inculdes(rank){
throw new Error("Invaild card");
}
if (rank === "A") return 11;
if (rank === "J" || rank === "Q" || rank === "K") return 10;

return Number(rank);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

  • There is a bug in this code.

@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 Mar 20, 2026
@Seti-Jemal Seti-Jemal added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 21, 2026
@Seti-Jemal Seti-Jemal closed this Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants