Skip to content

London | 26-ITP-Sep | Abakar Souleyman | Sprint 3 | Coursework - #1583

Open
abmhts wants to merge 23 commits into
CodeYourFuture:mainfrom
abmhts:coursework/sprint-3
Open

abmhts wants to merge 23 commits into
CodeYourFuture:mainfrom
abmhts:coursework/sprint-3

Conversation

@abmhts

@abmhts abmhts commented Sep 24, 2026

Copy link
Copy Markdown

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

Task code

CYF-1053

Changelist

Completed Sprint 3 tasks including time formatting, BMI calculation, toPounds, getLastDigit, and square functions.
Also fixed return statements, naming conventions, and documented the errors, predictions, and solutions.

@netlify

netlify Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit 89504ac
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/6aba71b593c2a200089c5c8c
😎 Deploy Preview https://deploy-preview-1583--cyf-onboarding-module.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
2 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 86 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@abmhts abmhts added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 24, 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 Sep 24, 2026
@github-actions

This comment has been minimized.

@abmhts abmhts added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 24, 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 Sep 24, 2026
@abmhts abmhts added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 24, 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 Sep 24, 2026
@abmhts abmhts added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 24, 2026
@hey-hammad hey-hammad 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 Sep 26, 2026

@hey-hammad hey-hammad 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.

Nice effort, one minor issues needs fixing. Thanks

Comment thread Sprint-3/1-key-errors/1.js Outdated
// Finally, correct the code to fix the problem
// =============> write your new code here

function convertToPercentage() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this fixes the issue, however the does the function still works correctly?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Think about, when given an input can the does the function return the correct output?

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.

The function wasn’t producing the correct output, but I’ve corrected it now. Thank you

@hey-hammad hey-hammad 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 Sep 26, 2026
@abmhts abmhts 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 Sep 26, 2026
@abdishakoor-dev abdishakoor-dev 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 Sep 28, 2026

@abdishakoor-dev abdishakoor-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

convertToPercentage works now for any input, thanks. Your time-format answers are all correct too.

A few things before I can mark this Complete:

  1. 1-key-errors/0.js: line 14 does not match your new code.

  2. 1-key-errors/1.js line 23 and 2-mandatory-debug/2.js line 34: see my comments there.

  3. 1-key-errors/2.js: line 14 is still empty.

  4. 2-cases.js: see my comment on the function name.

  5. Formatting. "My code is consistently formatted" is on the checklist. The tool that does it is called Prettier. It fixes spacing and indentation to one agreed style. Then a reviewer only sees the changes you meant to make. At the moment all 10 of your files fail that check.

    Prettier comes with the CYF extension pack from onboarding. Not sure you have it? In VS Code, go to Extensions and search for CodeYourFuture Extension Pack: https://marketplace.visualstudio.com/items?itemName=CodeYourFuture.cyf-extension-pack

    Then open each file you changed. Right click in the editor and choose Format Document. Pick Prettier if VS Code asks. Save and commit. To make this happen every time you save, follow the format on save steps here: https://github.com/CodeYourFuture/Module-JavaScript-Fundamentals/blob/main/practical_guide.md

Add the Needs Review label again once you've pushed.

Comment thread Sprint-3/1-key-errors/0.js Outdated
// }

// =============> write your explanation here
//- I changed the variable name to "strg" to avoid the error.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your code on line 17 doesn't use strg any more. Does line 14 still describe your fix? Update it to match.

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 the explanation on line 14.

Comment thread Sprint-3/1-key-errors/1.js Outdated

// =============> write your new code here

const decimalNumber = 0.5;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Line 27 uses decimalNumber. Which one does it use, line 23 or the parameter on line 25? Is line 23 needed? If not, remove 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.

It uses the parameter defined on line 25. Since we’re not using the previously declared value of 0.5, I removed it as it was unnecessary.

Comment thread Sprint-3/2-mandatory-debug/2.js Outdated
//-The function was looking at the outside "num" but Now there are two (num) one outside the scope "const num= 103" and i added another inside the function scope.
//-The function calculates something and returns it then console.log outside receives that returned value and prints it.

const num = 103;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is num on line 34 used now? Your function uses its own num parameter. If line 34 is not needed, remove 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.

I removed the unnecessary const num = 103 because the function already receives num as a parameter.

// return num * num;
// }

// =============> write the error message here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This answer is still empty. Your prediction on line 8 says SyntaxError. Was that right? Write the error name 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.

updated the error message.

// Use the MDN string documentation to help you find a solution
// This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase

function convertToUpperCase(sentence) {

@abdishakoor-dev abdishakoor-dev Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Function names should tell others what the function does. If you use toUpperCase() as an inspiration, what would be a better name for this function? Remember you have been asked for a function to convert yo upper snake case, not just upper case. There is a difference.

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.

Changed to " toUpperSnakeCase " which I think is more descriptive and closely related to what the function does.

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 ran Prettier on Sprint 3 folder.
image

@abdishakoor-dev abdishakoor-dev 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 Sep 28, 2026
@abmhts abmhts 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 Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants