generated from CodeYourFuture/Module-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 218
London | 25-ITP-May | Houssam Lahlah | Sprint 2 | Coursework/sprint 2 #700
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
HoussamLh
wants to merge
29
commits into
CodeYourFuture:main
Choose a base branch
from
HoussamLh:coursework/sprint-2
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 1 commit
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
2dd0a78
explain Increment count variable by 1 after initialization.
HoussamLh 1bc5c74
Create initials variable by extracting first characters of first, mid…
HoussamLh b16d048
create two variable and Extract directory and file extension parts fr…
HoussamLh 625c114
Add comments explaining how num is calculated as a random integer bet…
HoussamLh f5522e7
Add explanation for incrementing count variable by 1 after initializa…
HoussamLh 1cf3f70
I believe that I've Done the sprint 1 and this the last exercise.
HoussamLh b76c5a3
I believe that I've completed the first sprint.
HoussamLh 0748f7c
I've changed const to let for age variable to allow reassignment
HoussamLh d957dd1
Avoid redeclaring 'str' inside capitalise function
HoussamLh fcba7aa
Remove redeclaration of parameter and undefined variable usage in con…
HoussamLh c278bbb
Use valid parameter name instead of number in square function
HoussamLh 335cc37
Avoid redeclaring 'str' inside capitalise function
HoussamLh 2f9d4da
Return value from multiply function instead of just logging it
HoussamLh bdc5ac9
Correct return statement in sum function to return a + b
HoussamLh 16d6577
Update getLastDigit function to use input parameter instead of consta…
HoussamLh 8796b5b
Implement calculateBMI function with 1 decimal rounding
HoussamLh 1b5f2cf
Convert strings to UPPER_SNAKE_CASE format
HoussamLh 6573f60
Create reusable toPounds function with test cases
HoussamLh 01a1ced
Add inline comments explaining pad and formatTimeDisplay behaviour
HoussamLh eeff899
Correct 12-hour clock formatting and add comprehensive tests
HoussamLh f39781a
Revert Sprint-1 folder to CYF's original version
HoussamLh bce599b
Revert Sprint-1 folder to CYF's original version
HoussamLh 19f296f
convert kg to pounds and round to 2 decimal places
HoussamLh f63026f
Create reusable toPounds function from Sprint-1 code
HoussamLh a9c2a21
format 12-hour time consistently with 2-digit hours
HoussamLh 5eb1ab8
Refactor formatAs12HourClock to reduce code duplication
HoussamLh c229426
Merge branch 'CodeYourFuture:main' into acoursework/sprint-2
HoussamLh 81ae2ac
Refactor capitalize function and simplify code
HoussamLh 9b67749
Refactor convertToPercentage function and simplify code
HoussamLh 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
Remove redeclaration of parameter and undefined variable usage in con…
…vertToPercentage
- Loading branch information
commit fcba7aa37c53c7e539da4334533613ed08957a44
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
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.
I have the same comment as in task 0 - this works, but could be simplified further
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.
Hi LonMcGregor,
Thank you! I see your point — the extra variable isn’t needed here either. I can simplify it by returning the result directly, like:
function convertToPercentage(decimalNumber) {
return
${decimalNumber * 100}%
;}
This makes it cleaner while keeping the same functionality.