Skip to content

London | 26-ITP-Sep | Diana Ausiejute | Sprint 3 | Coursework-3 - #1626

Open
ausiejute wants to merge 9 commits into
CodeYourFuture:mainfrom
ausiejute:Coursework-3
Open

ausiejute wants to merge 9 commits into
CodeYourFuture:mainfrom
ausiejute:Coursework-3

Conversation

@ausiejute

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

Completed all Sprint 3 coursework exercises (except stretch one).

@netlify

netlify Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cyf-onboarding-module ready!

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

@ausiejute ausiejute added 📅 Sprint 3 Assigned during Sprint 3 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 28, 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 29, 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.

Your explanation in 2-mandatory-debug/1.js is spot on: a + b never runs because it comes after return.

Four things before I can mark this Complete:

  1. 2-mandatory-debug/0.js still prints undefined. See my comment on line 19.
  2. 2-cases.js: see my comment on line 18.
  3. time-format.js d): see my comment on line 35.
  4. 3-to-pounds.js: see my comment on line 25.

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

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

/* 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.

Your new code on lines 19 to 22 is correct. But it is inside /* */, so it never runs. The original code on lines 6 to 10 still runs. That is why the file still prints undefined.

You can check this yourself. In VS Code, right click 0.js in the file list on the left, and choose Open in Integrated Terminal. The terminal opens in the same folder as the file. Then run:

node 0.js

Please do the opposite, like in your other files: put the original code inside /* */, and take your new code out of it. Then run the command again. It should print The result of multiplying 10 and 32 is 320.

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.

Fixed now. It prints 320. Good.

// 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 upperCaseMaker(str) {

@abdishakoor-dev abdishakoor-dev Sep 29, 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.

Your function works: it gives THE_SUN_IS_SHINING. Only the name needs to change.

The name upperCaseMaker tells the reader that your function only makes the letters capital. But your function makes the letters capital and replaces spaces with _. That is called upper snake case (see line 4).

JavaScript already has a method called toUpperCase, which you use on line 19. If you use that name as inspiration, and knowing what upper snake case means, what would more appropriate function name that reflects what the function is actually doing? Please rename it, and update call on line 25.

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.

upperSnakeCaseMaker says both jobs now. Good.

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: a name like toUpperSnakeCase would fit even better. It follows the same pattern as JavaScript's own toUpperCase, which you use on line 19: "to" plus what the string becomes. Other developers will recognise that pattern straight away. Your name is fine for this exercise, so no change is needed.


// d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
// =============> write your answer here
// =============> 1, because that's the actual value assigned to the num parameter

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.

d) asks you to explain your answer. "because that's the actual value assigned to the num parameter" only repeats the question. Where does the 1 come from?

Your answer to e) on line 38 already says it: remainingSeconds is 1. Please add that reason to d) as well.

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 the reason. Good.

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

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

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 range of inputs on line 26, from 0p to 11000p. Line 6 asks you to call the function a number of times. Please turn these into calls, like line 25, so anyone who runs the file can see the results.

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, all six inputs run now.

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

All four are fixed, and every file prints the right output. Marking this Complete, well done.

@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 30, 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. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants