Cape Town | 26-ITP-May | Shafiek Walker | Sprint 3 | Implement and Rewrite Tests#1390
Open
shafiekwalker7861 wants to merge 3 commits into
Open
Conversation
LonMcGregor
reviewed
Jun 29, 2026
LonMcGregor
left a comment
There was a problem hiding this comment.
Good start on this task, I've left a few pointing questions to help you improve your solutions
| function isProperFraction(numerator, denominator) { | ||
| // TODO: Implement this function | ||
| if ( numerator < denominator && numerator > 0 && denominator > 0) { | ||
| return true; |
There was a problem hiding this comment.
Here you are returning true or false depending on the condition in your if statement. Is there a way you could simplify this?
Also, does it work for negative numerators?
|
|
||
| function getCardValue(card) { | ||
| // TODO: Implement this function | ||
| if (card === "A♠" || card === "A♥" || card === "A♦" || card === "A♣") { |
There was a problem hiding this comment.
Is there a way you could simplify this code so you avoid having 4 conditions for every single card type?
LonMcGregor
reviewed
Jul 1, 2026
LonMcGregor
left a comment
There was a problem hiding this comment.
Great work, these tasks are complete. Combining your fraction conditions into a single return value separated by ANDs is a good simplification.
Author
|
Hi LonMcGregor,
Thanks so much for the review and the helpful feedback! I really appreciate
it.
…On Wed, Jul 1, 2026 at 11:02 AM LonMcGregor ***@***.***> wrote:
***@***.**** commented on this pull request.
Great work, these tasks are complete. Combining your fraction conditions
into a single return value separated by ANDs is a good simplification.
—
Reply to this email directly, view it on GitHub
<#1390?email_source=notifications&email_token=A4CDQ6WHVJ25LS5PLRZ4FNL5CTHTFA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTINRQG4ZTOMJTGIY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#pullrequestreview-4607371321>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4CDQ6XJWP6BH5GYZRFMB2D5CTHTFAVCNFSNUABFKJSXA33TNF2G64TZHM3TSOJSGQ2TGNRYHNEXG43VMU5TINZSGQ3DEOBWGE3KC5QC>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/A4CDQ6SG5HGDUYG6AWK6VZL5CTHTFA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTINRQG4ZTOMJTGIY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/A4CDQ6Q3STLKZSQ6T7XMME35CTHTFA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTINRQG4ZTOMJTGIY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you authored the thread.Message ID:
<CodeYourFuture/Module-Structuring-and-Testing-Data/pull/1390/review/4607371321
@github.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
Completed the Sprint 3 "Implement and Rewrite Tests" exercises.
Implemented the required functions, rewrote the tests where needed, and verified that all tests pass using
npm test.