London | ITP-may-2026 | Hugh Mills | Sprint 2 | Sprint 2 Coursework#1515
Open
HM-127BTY wants to merge 10 commits into
Open
London | ITP-may-2026 | Hugh Mills | Sprint 2 | Sprint 2 Coursework#1515HM-127BTY wants to merge 10 commits into
HM-127BTY wants to merge 10 commits into
Conversation
Answered questions.
Added answers to questions.
Added answers to the questions
Added answers to the questions.
added answer to questions asked.
Added answers to the questions asked.
Added code for the bmi calculator,
Completed the code required for the task.
Added the simple code for converting to pounds, using kilograms.
Answered questions required.
cjyuan
reviewed
Jul 19, 2026
Comment on lines
+29
to
+36
| function convertToPercentage(decimalNumber) { | ||
| const decimal = 0.5; | ||
| const percentage = `${decimal * 100}%`; | ||
| return percentage; | ||
| } | ||
| console.log(convertToPercentage) |
Contributor
There was a problem hiding this comment.
How would you make the function to work for any valid argument?
For example, calling convertToPercentage(0.1) would return "10%".
Comment on lines
+18
to
+22
| function UpperSnake(text) { | ||
| let upperCase = text.toUpperCase(); | ||
| let snakeCase = upperCase.replaceAll(" ","_"); | ||
| return snakeCase; | ||
| } |
Contributor
There was a problem hiding this comment.
Code is correct.
Can you look up the naming conventions in JavaScript? In particular,
- Variable and function names
Then, update the function names according to those conventions.
Comment on lines
+7
to
+9
| function toPounds(weight) { | ||
| return (weight * 2.204); | ||
| } |
Contributor
There was a problem hiding this comment.
You are supposed to use the code in Sprint-1/3-mandatory-interpret/3-to-pounds.js to implement this function.
Comment on lines
28
to
+32
| // b) What is the value assigned to num when pad is called for the first time? | ||
| // =============> write your answer here | ||
| // =============> 61 | ||
|
|
||
| // c) What is the return value of pad is called for the first time? | ||
| // =============> write your answer here | ||
| // =============> "61" |
Contributor
There was a problem hiding this comment.
When pad() is called the first time, its parameter num is not 61.
|
|
||
| // e) What is the return value of pad when it is called for the last time in this program? Explain your answer | ||
| // =============> write your answer here | ||
| // =============> 1 at const remainingSexonds = seconds % 60 gives 1 No newline at end of file |
Contributor
There was a problem hiding this comment.
What does pad() return when its parameter num is 1?
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 questions asked and added in code required for each task.