-
-
Notifications
You must be signed in to change notification settings - Fork 197
Manchester | 25-ITP-May | Jennifer Isidienu | Sprint 3 | Coursework/Sprint-3* #689
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?
Manchester | 25-ITP-May | Jennifer Isidienu | Sprint 3 | Coursework/Sprint-3* #689
Conversation
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.
I've reviewed your code and noticed that some code is missing. Please take a moment to review and complete these.
It’s important to run and test your code before submitting - while many of your test cases look correct, they won’t pass as-is without working code behind them.
Due to these tests not passing & other parts of your submission, I suspect you may have used AI to generate some of this. Remember, the goal here isn’t just to complete the tasks, but to gain more understanding.
There’s still time before the final submission, and we’ve got two revision sessions ahead. Please feel free to reach out if you need support - happy to help.
// A proper fraction has a non-zero denominator, | ||
// and the absolute value of the numerator is less than the denominator. | ||
if (denominator === 0) return false; | ||
return Math.abs(numerator) < Math.abs(denominator); |
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.
What is the Math.abs
function doing to our inputs?
|
||
// If the rank is a number between "2" and "10", return its numeric value | ||
if (["2", "3", "4", "5", "6", "7", "8", "9", "10"].includes(rank)) { | ||
return parseInt(rank, 10); // Convert string to number |
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.
What is the purpose of 10
in parseInt
?
if (numerator < denominator) return true; | ||
// add your completed function from key-implement here | ||
// Check for positive values and that numerator is less than denominator | ||
if (numerator > 0 && denominator > 0 && numerator < denominator) { |
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.
small comment, not blocking:
If numerator > 0 && denominator > 0 && numerator < denominator
is evaluating to a boolean
& return a boolean
, we don't need to the if
statement:
function isProperFraction(numerator, denominator) {
return numerator > 0 && denominator > 0 && numerator < denominator;
}
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.
Alright. Thank you!
This is looking really good & all tests passing as expected 🙂 I will mark as complete |
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). |
Thanks Cameron |
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.