Skip to content

SA|ITP MAY 2025|INNOCENT NIWATWINE| Structuring and Data Testing| Sprint 3 #635

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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

InnocentNiwatwine
Copy link

No description provided.

@InnocentNiwatwine InnocentNiwatwine changed the title Sprint-3 SA|ITP MAY 2025|INNOCENT NIWATWINE| Structuring and Data Testing| Sprint 3 Jul 3, 2025
@InnocentNiwatwine InnocentNiwatwine added the Needs Review Participant to add when requesting review label Jul 9, 2025
@LonMcGregor LonMcGregor added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Participant to add when requesting review labels Jul 16, 2025
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

Hi, you have written good solutions here, there are just a few questions I have for you to look at before this sprint is complete.

if (angle === 180) return "Straight angle";
if (angle > 180 && angle < 360) return "Reflex angle";
else if (angle > 180 && angle < 360) return "Reflex angle";
}

Choose a reason for hiding this comment

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

Do you need to have the same condition twice here?

Copy link
Author

Choose a reason for hiding this comment

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

You are right i don't need to have the same condition twice because it is kind of duplication since the first condition already returns if that condition is true.I will proceed to remove ''else if'', thank you

} else if (numerator >= denominator) {
return false;
} else if (numerator === 1) {
return true;
}

Choose a reason for hiding this comment

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

Does this solution work for negative improper fractions, like -7/4?

Copy link
Author

Choose a reason for hiding this comment

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

It could not because i found out what i did only checks numerator>=denominator and it didnt include the negative improper fractions ,i have tried to correct it, Thank you

@@ -1,5 +1,7 @@
function isProperFraction(numerator, denominator) {
if (numerator < denominator) return true;
// add your completed function from key-implement here
if (numerator >= denominator) return false;
// add your completed function from key-implement here

Choose a reason for hiding this comment

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

Here you are checking a condition which will give a true or false value, and you are then returning the same true or false value. Can you see a way to rewrite this that would simplify the function?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed Volunteer to add when completing a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants