-
-
Notifications
You must be signed in to change notification settings - Fork 222
West Midlands | ITP-Sep-2025 | Ahmad Ehsas | Sprint 3 | Structuring and Testing Data #735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…, and invalid cards
…he goal of this function is to count how many times a specific character appears in a given string
…lues and update the test case.
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. 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). |
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. 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). |
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. 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). |
1 similar comment
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. 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 (numerator < denominator) return true; | ||
if (Math.abs(numerator) < denominator) return true; // This version of code works correctly for proper and negative fractions. | ||
if (Math.abs(numerator) >= Math.abs(denominator)) return false; | ||
if (Math.abs(numerator) === Math.abs(denominator)) return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think line 12 with >= already covers the check done in line 13 with === for this particular case?
if (["K", "Q", "J"].includes(rank)) return 10; | ||
|
||
// If rank is numeric (2-10), safely convert to number | ||
return parseInt(rank, 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think using Number(rank) is simpler than accounting for base 10)?
Nice work. |
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. 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). |
1 similar comment
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. 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). |
Self checklist
Changelist
Briefly explain your PR.
I have completed all the mandatory tasks. The changes I have made in the files are as below:
Questions
Ask any questions you have for your reviewer.