London | 26-ITP-May | Chinwe Chukwuma | Sprint 3 | implement-and-rewrite - #1573
London | 26-ITP-May | Chinwe Chukwuma | Sprint 3 | implement-and-rewrite#1573ChinweP wants to merge 11 commits into
Conversation
…ithub.com/ChinweP/Module-Structuring-and-Testing-Data into coursework/sprint-3-implement-and-rewrite
| if (denominator <= 0) { | ||
| return false; | ||
| } | ||
| return numerator < denominator; |
There was a problem hiding this comment.
What authoritative source do you base your definition of a proper fraction on?
There was a problem hiding this comment.
Thank you @cjyuan for your feedback. I have added authoritative source and made necessary adjustments.
| }); | ||
|
|
||
| // Case 6: Invalid angles | ||
| test(`should return "Invalid angle" for angles outside valid range`, () => { |
There was a problem hiding this comment.
Could consider indicate explicitly what the valid range is.
There was a problem hiding this comment.
Hi @cjyuan, I've made the clarification. Thank you for your feedback.
| }); | ||
|
|
||
| // Case 6: Invalid angles | ||
| test(`should return "Invalid angle" for angles outside valid range (1-359)`, () => { |
There was a problem hiding this comment.
Could the value of angle be a decimal number? For example, is 0.5 a valid angle?
There was a problem hiding this comment.
Thanks for pointing this out. I hadn't considered decimal angles, but I've now added tests to cover fractional values like 0.5.
There was a problem hiding this comment.
What about the valid range?
... outside valid range (1-359)
| - The denominator is positive. | ||
|
|
||
| Source: https://www.mathsisfun.com/proper-fractions.html |
There was a problem hiding this comment.
Note: The source does not actually say anything about negative numerator or denominator.
No change required because the spec also does not say anything about what to do with negative numbers.
Learners, PR Template
Self checklist
Changelist
Completed coursework/implement-and-rewrite following the ReadMe instruction.