generated from CodeYourFuture/Module-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 273
West Midlands | ITP-Sept-25 | Mustaf Asani | Sprint 3 | Coursework/sprint 3 implement and rewrite #795
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
asaniDev
wants to merge
30
commits into
CodeYourFuture:main
Choose a base branch
from
asaniDev:coursework/sprint-3-implement-and-rewrite
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
West Midlands | ITP-Sept-25 | Mustaf Asani | Sprint 3 | Coursework/sprint 3 implement and rewrite #795
Changes from 3 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
26fd354
changed the name of the string in the function
asaniDev 5ab6322
removed line 10 and passed function to console
asaniDev 0c7cc6f
corrected the error with the function
asaniDev cc216e1
added a return to the function
asaniDev 90013dc
moved the return command to the line below it
asaniDev f63f7cf
created a function that returns the bmi
asaniDev a02b0c5
created a function that converts a given string to snake case
asaniDev e097316
created a toPounds function to return a pounds and pence notation
asaniDev 742c228
answered all the questions in the exercise
asaniDev 0d5ad45
wrote tests for any edge cases and fixed resulting bugs
asaniDev 2038048
made a function for angle types and added tests for all angles
asaniDev 7daf16b
added tests for most fraction types and conditions for them as well
asaniDev dfebb97
added conditions for all ranks in a deck of cards and tests for them
asaniDev 6865348
added jest tests for all angle types
asaniDev 43d650c
added jest tests for different card values
asaniDev 3ca95c6
took away comment on line 30
asaniDev c56bd67
revert multiple commits that were from sprint 2
asaniDev 2765c49
added tests for multiple samples, removed a test for ace of spades, c…
asaniDev 035e27e
removed check for ace of spades, adjusted rank to give the full value…
asaniDev 50ee9ef
corrected test for numerator is 0 to a proper fraction, and removed u…
asaniDev bcbd867
added a regex to make sure only exact number card value matches will …
asaniDev 137fd7c
added a few tests for negative improper fractions
asaniDev e5b18e4
added more tests to make the test suites more robust, moved ten to nu…
asaniDev 5fa3d08
removed console.log used for testing.
asaniDev d58910a
used regex pattern to check for ranks and removed includes method
asaniDev 8b52886
added dev dependencies
asaniDev 78f21df
revert changes to sprint 2 folder
asaniDev 8ad9d08
reverted changes to 1.js
asaniDev 14ddfad
reverted changes to 2.js in sprint 2 file.
asaniDev 1a5aada
revert unwanted change
asaniDev 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,14 @@ | ||
| // Predict and explain first... | ||
|
|
||
| // =============> write your prediction here | ||
| //line 7 will log the result of a * b, line 10 will throw an error since the function does not return anything so it will say The result of multiplying 10 and 32 is undefined. | ||
|
|
||
| //function multiply(a, b) { | ||
| // console.log(a * b); | ||
| //} | ||
| function multiply(a, b) { | ||
| console.log(a * b); | ||
| } | ||
|
|
||
| //console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`); | ||
| console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`); | ||
|
|
||
| // =============> write your explanation here | ||
| //since the function does not return a value we get undefined passed back to the console. | ||
|
|
||
| // Finally, correct the code to fix the problem | ||
| // =============> write your new code here | ||
| function multiply(a, b) { | ||
| return a * b; | ||
| } | ||
|
|
||
| console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`); |
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,20 +1,13 @@ | ||
| // Predict and explain first... | ||
| // =============> write your prediction here | ||
| // the console will show The sum of 10 and 32 is undefined, this is because the return command is before the calculation so the return has no value to bring back. | ||
|
|
||
| //function sum(a, b) { | ||
| // return; | ||
| // a + b; | ||
| //} | ||
| function sum(a, b) { | ||
| return; | ||
| a + b; | ||
| } | ||
|
|
||
| //console.log(`The sum of 10 and 32 is ${sum(10, 32)}`); | ||
| console.log(`The sum of 10 and 32 is ${sum(10, 32)}`); | ||
|
|
||
| // =============> write your explanation here | ||
| //the console will show The sum of 10 and 32 is undefined, this is because the return command is before the calculation so the return has no value to bring back. | ||
| // Finally, correct the code to fix the problem | ||
| // =============> write your new code here | ||
| function sum(a, b) { | ||
| return a + b; | ||
| } | ||
|
|
||
| console.log(`The sum of 10 and 32 is ${sum(10, 32)}`); |
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 |
|---|---|---|
|
|
@@ -9,14 +9,19 @@ test("should return true for a proper fraction", () => { | |
| // Case 2: Identify Improper Fractions: | ||
| test("should return false for an improper fraction", () => { | ||
| expect(isProperFraction(7, 4)).toEqual(false); | ||
| expect(isProperFraction(35, 8)).toEqual(false); | ||
|
||
| }); | ||
|
|
||
| // Case 3: Identify Negative Fractions: | ||
| test("should return true for a proper fraction based on the absolute values of the numerator and denominator", () => { | ||
| expect(isProperFraction(-3, 8)).toEqual(true); | ||
| expect(isProperFraction(-3, -8)).toEqual(true); | ||
| expect(isProperFraction(3, -8)).toEqual(true); | ||
| expect(isProperFraction(3, 8)).toEqual(true); | ||
| }); | ||
|
|
||
| // Case 4: Identify Equal Numerator and Denominator: | ||
| test("should return false for an equal fraction", () => { | ||
| expect(isProperFraction(4, 4)).toEqual(false); | ||
| expect(isProperFraction(-7, -7)).toEqual(false); | ||
| }); | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.