Skip to content

London | ITP-may-2026 | Hugh Mills | Sprint 2 | Sprint 2 Coursework#1515

Open
HM-127BTY wants to merge 10 commits into
CodeYourFuture:mainfrom
HM-127BTY:acoursework/sprint-2`
Open

London | ITP-may-2026 | Hugh Mills | Sprint 2 | Sprint 2 Coursework#1515
HM-127BTY wants to merge 10 commits into
CodeYourFuture:mainfrom
HM-127BTY:acoursework/sprint-2`

Conversation

@HM-127BTY

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Completed the questions asked and added in code required for each task.

HM-127BTY added 10 commits July 9, 2026 18:03
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.
@HM-127BTY HM-127BTY added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 15, 2026
Comment on lines +29 to +36
function convertToPercentage(decimalNumber) {
const decimal = 0.5;
const percentage = `${decimal * 100}%`;
return percentage;
}
console.log(convertToPercentage)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does pad() return when its parameter num is 1?

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants