Skip to content

London | 26-ITP-May | Alex Jamshidi | Sprint 2 | Coursework#1316

Open
Alex-Jamshidi wants to merge 8 commits into
CodeYourFuture:mainfrom
Alex-Jamshidi:coursework/sprint-2
Open

London | 26-ITP-May | Alex Jamshidi | Sprint 2 | Coursework#1316
Alex-Jamshidi wants to merge 8 commits into
CodeYourFuture:mainfrom
Alex-Jamshidi:coursework/sprint-2

Conversation

@Alex-Jamshidi
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 solutions to sprint 2 coursework

@Alex-Jamshidi Alex-Jamshidi 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. Module-Structuring-And-Testing-Data The name of the module. labels May 11, 2026
@illicitonion illicitonion 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 May 15, 2026
Copy link
Copy Markdown
Member

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

Generally LGTM, but a couple of things to look at.

// Uncaught SyntaxError: Identifier 'decimalNumber' has already been declared
// As predicted the function is trying to declare a variable that has already been determined

// Finally, correct the code to fix the problem
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this file now do what you'd expect when you run it?

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.

Not a very useful function if input is immediately ignored
removed variable line entirely so percentage is calculated from function argument

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see this update - are you sure you committed+pushed?

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.

updated now

@@ -15,5 +15,5 @@
// It should return their Body Mass Index to 1 decimal place

function calculateBMI(weight, height) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Try calling this function - does it calculate the value you expect?

(e.g. with the example given of 70 and 1.73 which has an expected answer. Or try 50 and 2 - what do you get?)

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.

ah!

I assumed that ^ was going to raise to the power as in scientific notation.
When I tested for 70 1.73, it was so close that I assumed it was a rounding error in the question. :')

I understand ^ is not that at all, have updated code to ** 2 for powers

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense!

For the future, if you think the expected outputs we give you for exercises are wrong, please raise it with us so we can fix them (or work out they're actually right)! :)

@illicitonion illicitonion 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 May 15, 2026
@Alex-Jamshidi Alex-Jamshidi 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 May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Structuring-And-Testing-Data The name of the module. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants