Skip to content

London | 26-Sep-ITP | Frumentius Tesfay | Sprint 3 | Coursework - #1589

Open
Frumentius-Rev wants to merge 23 commits into
CodeYourFuture:mainfrom
Frumentius-Rev:acoursework/sprint-3
Open

Frumentius-Rev wants to merge 23 commits into
CodeYourFuture:mainfrom
Frumentius-Rev:acoursework/sprint-3

Conversation

@Frumentius-Rev

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

Task code

CYF-1053

Changelist

I have demonstrated debugging and interpretation skills and completed the Sprint 3 requirements.

@netlify

netlify Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit a6a94bc
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/6abbafdfce817e00094e885f
😎 Deploy Preview https://deploy-preview-1589--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.

@Frumentius-Rev Frumentius-Rev added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 25, 2026
@Frumentius-Rev

Copy link
Copy Markdown
Author

Hey, I removed one of the code comments but left the others. I’ll make sure to remove all unnecessary comments next time to keep the code tidy and professional.

@madhuranakate madhuranakate 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 25, 2026
Comment thread Sprint-3/1-key-errors/0.js Outdated
// If I give the new variable a different name, I hope it should work :)

function capitalise(str) {
let newString = `${str[0].toUpperCase()}${str.slice(1)}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

good analysis but can be variable name be something better ? a name that suggests what it holds

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.

oh, you’re right! I didn’t focus on using a descriptive name in the first place. I think capitalisedString is clearer and tidier. Thank you for pointing that out!

Comment thread Sprint-3/1-key-errors/1.js Outdated
return percentage;
}

console.log(convertToPercentage("26"));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Although the updated function is correct, could you check again what parameter says should be passed into the function ?

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is there a possibility that the logs are being duplicated ?

// This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase

function toUpper(input) {
return input.replaceAll(" ", "_").toUpperCase();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

apart from uppercase, is this function perhaps adding something that does not exist in the input ?

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.

Yeah, I noticed that it also replaces the spaces with underscores besides converting to uppercase.


// c) What is the return value of pad when it is called for the first time?
// =============> write your answer here
// 00

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

even though the answer is correct, could it perhaps be a different return type ?


// e) What is the return value of pad when it is called for the last time in this program? Explain your answer
// =============> write your answer here
// 01

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

even though the answer is correct, could it perhaps be a different return type ?

@Frumentius-Rev Frumentius-Rev added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 25, 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.

Thanks for the fixes. capitalisedString is a clear name, and the quotes in c) and e) are right now.

A few things before this can be marked Complete:

  1. 2-mandatory-debug/0.js still prints the result twice. See my comment on line 6.
  2. 1-key-errors/1.js: see my comment on line 32.
  3. time-format.js d) and e) both say "Explain your answer". Lines 36 and 39 give only the value. Add a short reason to each.
  4. 3-to-pounds.js: see my comment on line 24.
  5. 2-mandatory-debug/2.js: see my comment on line 28.
  6. 2-cases.js: see my comment on line 18.
  7. 2-mandatory-debug/0.js fails Prettier. Line 21 has spaces on an empty line. Right click in the file, choose Format Document, save and push. To format every time you save, follow the 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/2-mandatory-debug/0.js Outdated
// =============> write your prediction here
// I believe the function will calculate 10 x 32

function multiply(a, b) {

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.

Lines 6 to 10 are the original code, and they still run. That is why the result prints twice. How did you stop the original code running in your other files?

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.

Prints once now. Good.

Comment thread Sprint-3/1-key-errors/1.js Outdated
return percentage;
}

console.log(convertToPercentage(26));

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.

The parameter is called decimalNumber. convertToPercentage(26) prints 2600%. Is 26 a decimal number? What would you pass to get 26%?

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.

0.7 gives 70%. Good.

return `£${pounds}.${pence}`;
}

console.log(toPounds("1250p"));

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 6 asks you to call the function a number of times, with different inputs. Line 24 calls it once. Try a few more, for example a short one and a long one.

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.

Good, three different inputs now.

Comment thread Sprint-3/2-mandatory-debug/2.js Outdated
// Finally, correct the code to fix the problem
// =============> write your new code here

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

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.

Removed, good. A note for next time: two empty lines are left where it was, and Prettier flags them. With format on save turned on, Prettier removes them for you.

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.

Alright, I will. Thanks

// 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 toUpper(input) {

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. toUpper only describes part of it. If you use toUpperCase() as an inspiration, what would be a better name for this function?

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.

toUpperSnakeCase is the one.

@abdishakoor-dev abdishakoor-dev 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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Sep 28, 2026
@Frumentius-Rev
Frumentius-Rev force-pushed the acoursework/sprint-3 branch 2 times, most recently from 9f31e1e to 6b8ec14 Compare September 28, 2026 15:45
@Frumentius-Rev Frumentius-Rev added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 29, 2026
@Frumentius-Rev

Copy link
Copy Markdown
Author

Thanks for the feedback! It helps me a lot and helps me see things from a different perspective. I’ve addressed all the comments and pushed the fixes. Everything should now be ready for review. 🌱

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

That's everything from the list, and d) and e) now explain why. Marking this Complete, well done.

I've left two small notes inline for next time. They don't need changes here.

// If I give the new variable a different name, I hope it should work :)

function capitalise(str) {
let capitalisedString = `${str[0].toUpperCase()}${str.slice(1)}`;

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.

For next time: capitalisedString is never given a new value, so it can be const instead of let. The same goes for BMI in 1-bmi.js line 18. Use let only when the value changes later.


// You should call this function a number of times to check it works for different inputs

function toPounds(amount) {

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.

For next time: amount could be any kind of amount. The input is a string of pence, like "50p". A name like penceString tells the reader that.

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.

Exactly! I will it in mind.

@abdishakoor-dev abdishakoor-dev 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. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Sep 29, 2026
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