Skip to content

London | 26-ITP-Sep | Hanna Bohlin | Sprint 3 | Sprint 3 Coursework - #1556

Open
habohlin wants to merge 13 commits into
CodeYourFuture:mainfrom
habohlin:Sprint-3-coursework
Open

habohlin wants to merge 13 commits into
CodeYourFuture:mainfrom
habohlin:Sprint-3-coursework

Conversation

@habohlin

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 solved the coursework in folder "Sprint-3". I also committed the "prep" folder, which you can ignore as it doesn't need grading.

@netlify

netlify Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cyf-onboarding-module ready!

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

@github-actions

This comment has been minimized.

@habohlin habohlin added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 20, 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 20, 2026
@habohlin habohlin added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 20, 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 20, 2026
@habohlin habohlin added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 20, 2026
@webmonch
webmonch self-requested a review September 24, 2026 18:34
@webmonch webmonch 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 24, 2026

//tests
let [pounds, pence] = toPounds("399p");
console.log(`£${pounds}.${pence}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you think of a way to avoid repeating £${pounds}.${pence} after every call?"

const hours = Number(time.slice(0, 2));
if (hours > 12) {
return `${hours - 12}:00 pm`;
return `${hours - 12 < 10 ? "0" : ""}${hours - 12}:${time.slice(-2)} pm`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you think of any other edge cases that could surface here?


function calculateBMI(weight, height) {
// return the BMI of someone based off their weight and height
return Number.parseFloat(weight / (height * height)).toFixed(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.

Could be worth having another look at the Number.parseFloat docs. What type of value does it expect, and what are we passing it here?

console.log(calculateBMI(80, 1.69));
console.log(calculateBMI(51, 1.55));

// Please could I have a little feedback about if I have refactored the function return too much?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

One line is totally fine here! As a rule of thumb, you can keep it in one line as long as it is easy to understand.

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

function toUpperSnakeCase(str) {
return str.toUpperCase().split(" ").join("_");

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! Very clean solution and great function name.

@webmonch

webmonch commented Sep 24, 2026 •

Copy link
Copy Markdown

Great job! Very solid and clean solutions. And kudos on doing the extend exercise!

@webmonch webmonch added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Sep 24, 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.

2 participants