Skip to content

London | 26-ITP_May | Vito Moratti | Sprint 2 | Coursework/sprint 2#1429

Open
vmoratti wants to merge 44 commits into
CodeYourFuture:mainfrom
vmoratti:coursework/sprint-2
Open

London | 26-ITP_May | Vito Moratti | Sprint 2 | Coursework/sprint 2#1429
vmoratti wants to merge 44 commits into
CodeYourFuture:mainfrom
vmoratti:coursework/sprint-2

Conversation

@vmoratti

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

I have completed all the exercises in the course work.

@github-actions

This comment has been minimized.

@vmoratti vmoratti added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 3 Assigned during Sprint 3 of this module labels Jun 30, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 30, 2026
@vmoratti vmoratti added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 30, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 30, 2026
@vmoratti vmoratti added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 4, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good start, and well done on attempting the stretch task. I've left a couple of comments for further improvements

Comment thread Sprint-2/3-mandatory-implement/1-bmi.js Outdated
// return the BMI of someone based off their weight and height
} No newline at end of file
let bmi = weight / (height **2 )// weight divided by height squared.
return `Your Body Mass Index is ${bmi.toFixed(1)} units`// toFixed(1) insures that result is displayed

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Have a look at the comment above. It says the function should "return their Body Mass Index to 1 decimal place". Your function works, but does it meet this specific criteria?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sorry, but i don't understand what am I missing. The function returns correct BMI with one decimal place using "bmi.toFixed(1)" method

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your calculation is correct, but read carefully what the task is asking for. It says
It should return their Body Mass Index to 1 decimal place

Is that what your function does? You are returning a string here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Oh, I see. I got overly enthusiastic with the result, when only bmi number is expected.
Thank you for pointing that out.

Comment thread Sprint-2/5-stretch-extend/format-time.js Outdated
Comment thread Sprint-2/5-stretch-extend/format-time.js
@LonMcGregor LonMcGregor 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 6, 2026
vmoratti added 2 commits July 6, 2026 19:07
Refactor formatAs12HourClock function to improve readability and fix output format. Adjust test cases to match expected output format without spaces.
@vmoratti vmoratti added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 6, 2026
@LonMcGregor

Copy link
Copy Markdown

Good work on the time task - it is done now. See my earlier comment about the BMI calc.

@LonMcGregor LonMcGregor removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 7, 2026
Updated the calculateBMI function to return only the BMI value with one decimal place instead of a full message.
@vmoratti vmoratti added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 7, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Correct. Typically a function will do one task, and a different function will handle presentation

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

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants