Skip to content

Manchester |26-ITP-Jan | Farancis Dore Etonkie | Sprint 2 | Module Structuring and testing data#1213

Open
FarancisGH wants to merge 4 commits intoCodeYourFuture:mainfrom
FarancisGH:CourseWork/Sprint-2
Open

Manchester |26-ITP-Jan | Farancis Dore Etonkie | Sprint 2 | Module Structuring and testing data#1213
FarancisGH wants to merge 4 commits intoCodeYourFuture:mainfrom
FarancisGH:CourseWork/Sprint-2

Conversation

@FarancisGH
Copy link

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

  1. Adjustment made on correcting errors
  2. Adjustment made on debugging
  3. Adjustment made on implementation and interpretation

…ors and improve code functionality. The commit includes modifications to 0.js, 1.js, and 2.js to address variable declaration issues and parameter naming conventions.
…int-2/2-mandatory-debug/1.js, and Sprint-2/2-mandatory-debug/2.js have been staged for commit. The changes include fixing the sum function to return the correct result and correcting the getLastDigit function to use the parameter instead of a global variable.
@FarancisGH FarancisGH 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 Mar 7, 2026
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

Code looks good, and well formatted.

Just one misinterpretation.

console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);

// =============> write your explanation here
// The function multiply takes two parameters, a and b, and logs their product to the console. However, it does not return any value, which means that when we try to use the result of multiply in the template literal, it will be undefined. This will lead to the output: "The result of multiplying 10 and 32 is undefined". To fix this, we need to modify the multiply function to return the product instead of just logging it.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could consider breaking a long comment into multiple lines so that others don't have to scroll horizontally in the editor to read the comment.

Comment on lines 1 to +9
// In Sprint-1, there is a program written in interpret/to-pounds.js

// You will need to take this code and turn it into a reusable block of code.
// You will need to declare a function called toPounds with an appropriately named parameter.

// You should call this function a number of times to check it works for different inputs
function toPounds(kilograms) {
return kilograms * 2.20462;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

In this exercise, the objective is to implement a function that, when given a pence string in the form "399p", returns a string representing the equivalent amount in British pounds.

You can use the code from an exercise in Sprint-1, or you can write your own code -- one or two lines of code should be enough.

@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 Mar 11, 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. 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