Skip to content

Conversation

@MohammedNaru
Copy link

Sprint 2 Coursework

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

Currently working on Pr

Questions

No questions currently

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-2) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@MohammedNaru MohammedNaru changed the title West Midlands | Sept-ITP-2025 | Ali Naru | Sprint-2 | Coursework/sprint-2 West Midlands | 25-ITP-Sept | Ali Naru | Sprint-2 | Coursework/sprint-2 Nov 3, 2025
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-2) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@MohammedNaru MohammedNaru changed the title West Midlands | 25-ITP-Sept | Ali Naru | Sprint-2 | Coursework/sprint-2 West Midlands | 25-ITP-Sep | Ali Naru | Sprint 2 | Coursework/sprint-2 Nov 3, 2025
@MohammedNaru MohammedNaru changed the title West Midlands | 25-ITP-Sep | Ali Naru | Sprint 2 | Coursework/sprint-2 West Midlands | 25-ITP-Sept | Ali Naru | Sprint 2 | Coursework/sprint-2 Nov 3, 2025
@MohammedNaru MohammedNaru added 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 Nov 3, 2025
Comment on lines +25 to +29
function convertToPercentage(decimalNumber) {
decimalNumber = 0.5;
const percentage = `${decimalNumber * 100}%`;

return percentage;
Copy link
Contributor

Choose a reason for hiding this comment

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

  • This is an incomplete implementation of the function.
  • This function will always return "50%", which is not very useful. Can you improve its reusability so that it can be used to convert any number to an equivalent string in percentage format?


function calculateBMI(weight, height) {
const bmi = weight / (height * height);
return bmi.toFixed(1);
Copy link
Contributor

Choose a reason for hiding this comment

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

What type of value do you expect your function to return? A number or a string?
Does your function return the type of value you expect?

Different types of values may appear identical in the console output, but they are represented and treated differently in the program. For example,

  console.log(123);              // Output 123
  console.log("123");            // Output 123
  
  // Treated differently in the program
  let sum1 = 123 + 100;         // Evaluate to 223 -- a number
  let sum 2 = "123" + 100;      // Evaluate to "123100" -- a string.

@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 Nov 8, 2025
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. Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants