Skip to content

West Midlands | 26-Jan-ITP | Fida H Ali Zada | Sprint 2 | coursework/sprint-2#946

Closed
alizada-dev wants to merge 12 commits into
CodeYourFuture:mainfrom
alizada-dev:coursework/sprint-2
Closed

West Midlands | 26-Jan-ITP | Fida H Ali Zada | Sprint 2 | coursework/sprint-2#946
alizada-dev wants to merge 12 commits into
CodeYourFuture:mainfrom
alizada-dev:coursework/sprint-2

Conversation

@alizada-dev

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 Sprint-2 coursework exercises of the Structuring and Testing Data module.

@alizada-dev alizada-dev added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 9, 2026
@magarpratik magarpratik added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Feb 15, 2026
Comment thread Sprint-2/3-mandatory-implement/1-bmi.js Outdated
function calculateBMI(weight, height) {
// return the BMI of someone based off their weight and height
} No newline at end of file
let bmi = weight / (height * height);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I noticed you've used let here and in most other places. Could we use another keyword which might be a better fit?

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.

I used const instead of let

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice! 👌

Could you also review the other places where let is being used?

For reference, here is the CYF Code Style Guide.

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.

Yes, I reviewed the other exercises and changed let to const here as well: const value = Number(penceString.slice(0, -1)) / 100; which was required.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice! 👍 I can still see a few places where we can use const. Could you find them?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yup! 👍

Could you review this file too?

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.

I believe const is not suitable here:
let hours = Number(time.slice(0, 2));
let minutes = Number(time.slice(3, 5));
let ampm = hours >= 12 ? 'pm' : 'am';

because the variable value changes in the next lines of code. I changed these to const but gave error.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I believe one of them can be const because it is not reassigned. Could you work out which one?

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.

Ahh, you got me there!! Thanks for pointing it out. Changed let to const in the ampm variable.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice one! I've changed the label to complete now.

Comment thread Sprint-2/3-mandatory-implement/2-cases.js Outdated
Comment thread Sprint-2/3-mandatory-implement/3-to-pounds.js
Comment thread Sprint-2/5-stretch-extend/format-time.js
@magarpratik magarpratik added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Feb 15, 2026
@alizada-dev alizada-dev added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Feb 15, 2026
@magarpratik magarpratik added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Feb 15, 2026
Comment thread Sprint-2/3-mandatory-implement/2-cases.js Outdated
@magarpratik magarpratik added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Feb 15, 2026
@alizada-dev alizada-dev added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Feb 15, 2026
@magarpratik magarpratik 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 Feb 15, 2026
@alizada-dev alizada-dev added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Feb 15, 2026
@magarpratik magarpratik 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 Feb 15, 2026
@alizada-dev alizada-dev added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Feb 16, 2026
@magarpratik magarpratik 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. labels Feb 16, 2026
@illicitonion

Copy link
Copy Markdown
Member

Closing PR because the January ITP run has finished. Feel free to re-open if you're still working on it.

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.

3 participants