-
Notifications
You must be signed in to change notification settings - Fork 20
Brussels | ITP-2026-1 | James Ishimwe | Sprint 3 | Coursework/sprint 3 #81
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
jamesishimwe
wants to merge
61
commits into
HackYourFutureBelgium:main
Choose a base branch
from
jamesishimwe:sprint-3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
847f273
describe what line 3 is doing
jamesishimwe 549e2b3
assign initials the values returned after each name is passed to subs…
jamesishimwe 780e06a
create variables,dir and ext
jamesishimwe 5a22c35
work out what num represents
jamesishimwe 4beaaa7
use documentation to break down num
jamesishimwe ab64056
turn the line into comments
jamesishimwe 24827db
declare age using let instead of const
jamesishimwe df994e9
declare the variable cityOfBirth before using it
jamesishimwe 040dd2c
convert cardNumber into a string before using slice on it
jamesishimwe f497f02
rename variables and start with a letter
jamesishimwe 28fb9f2
add comma to separate arguments taken by replaceAll
jamesishimwe d02994a
answer the questions
jamesishimwe 51078bc
answer the questions
jamesishimwe 7bcd0d3
answer the questions
jamesishimwe 2751726
answer the questions
jamesishimwe 8f083a5
answer the questions
jamesishimwe 3b63357
use incrementation operator to add one to count variable
jamesishimwe 554f516
declare and assign initials variable at the same time
jamesishimwe d8527c9
change cardNumber variable to string
jamesishimwe b41acf0
convert hour,minute and second to string format with two characters
jamesishimwe 278c8d3
Implement function toPounds
jamesishimwe faee7b6
Answer the questions
jamesishimwe 4d41761
add test for acute,obtuse,straight and full angles
jamesishimwe 29e907b
complete test for obtuse angle
jamesishimwe 83d6386
add test for straight angle
jamesishimwe 79f9627
add test for reflex angle
jamesishimwe c86e2f1
add test for full angle
jamesishimwe bcaf210
Make corrections on angles for straight,reflex,full
jamesishimwe 2b8c484
Write more test: negative , equal and improper fractions
jamesishimwe c8ef773
Write test for negative fraction
jamesishimwe 9b82cc5
Write test for equal fraction
jamesishimwe 25650ce
add test for zero as the numerator
jamesishimwe 186adcd
Declare the variable rank and assign it
jamesishimwe d9220ae
Create card groups
jamesishimwe c32250e
add a test for each card group in the function
jamesishimwe 0570e10
Add test in the function for invalid card
jamesishimwe 3f33088
add test for card Five of Hearts
jamesishimwe 36f28be
add test for Face cards
jamesishimwe 9d1a257
add a test for invalid cards
jamesishimwe 1f610e6
Install jest
jamesishimwe 2339e5d
add jest test for acute angle
jamesishimwe a8cf4e3
add jest test for obtuse angle
jamesishimwe e6a30c0
add jest test for straight angle
jamesishimwe 1285f30
add jest test for reflex angle
jamesishimwe 7b89341
add jest test for improper fraction
jamesishimwe 2cf7cf6
add jest tests for negative fractions
jamesishimwe 6820289
add jest test for equal numerator and denominator fraction
jamesishimwe cca448e
add jest tests for 2-10 cards
jamesishimwe 00705ea
add jest tests for Face cards
jamesishimwe a5b1a4f
add jest test for invalid cards
jamesishimwe 8963c86
Implement function countChar
jamesishimwe a273c2f
add jest test for no occurances
jamesishimwe 00bcbf2
Implement the function getOrdinalNumber
jamesishimwe b131ae5
Add test for 2nd
jamesishimwe e7469d6
Add test for 3rd
jamesishimwe 3e910ee
Add test for 30th
jamesishimwe c0e3b2e
Implement function repeat
jamesishimwe f23f89e
Add test for count 1
jamesishimwe cbc9f6d
Add test for count 0
jamesishimwe b419f7a
Add test for count which is negative
jamesishimwe 9b8cd1e
Undo changes to Sprint 1 folder
jamesishimwe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| function countChar(stringOfCharacters, findCharacter) { | ||
| return 5 | ||
| return stringOfCharacters.split("").filter((char) => char === findCharacter) | ||
| .length; | ||
| } | ||
|
|
||
| module.exports = countChar; |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,12 @@ | ||
| function getOrdinalNumber(num) { | ||
| return "1st"; | ||
| if (num === 11) return "11th"; | ||
| else if (num === 12) return "12th"; | ||
| else if (num === 13) return "13th"; | ||
| numLast = num.toString().slice(-1); | ||
| if (numLast === "1") return `${num}st`; | ||
| else if (numLast === "2") return `${num}nd`; | ||
| else if (numLast === "3") return `${num}rd`; | ||
| else return `${num}th`; | ||
| } | ||
|
|
||
| module.exports = getOrdinalNumber; |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| function repeat() { | ||
| return "hellohellohello"; | ||
| function repeat(str, count) { | ||
| if (count < 0) return "Invalid times"; | ||
| return Array(count) | ||
| .fill(0) | ||
| .map(() => str) | ||
| .join(""); | ||
| } | ||
|
|
||
| module.exports = repeat; |
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
Oops, something went wrong.
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.
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.
You should throw an error instead of returning a string (and then update the tests at the bottom)