Skip to content

Cape Town | 27-ITP-September | Sima Nongawuza | Sprint 2 | Coursework-sprint 2 - #1609

Open
simanongawuza wants to merge 27 commits into
CodeYourFuture:mainfrom
simanongawuza:coursework/sprint-2
Open

simanongawuza wants to merge 27 commits into
CodeYourFuture:mainfrom
simanongawuza:coursework/sprint-2

Conversation

@simanongawuza

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-1039

Changelist

  • Answered some questions related to coursework sprint 2.

@netlify

netlify Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cyf-onboarding-module ready!

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

@simanongawuza simanongawuza changed the title Cape Town | 27-ITP-September | Sima Nongawuza | Sprint 2 | Coursework Cape Town | 27-ITP-September | Sima Nongawuza | Sprint 2 | Coursework-sprint 2 Sep 27, 2026
@github-actions

This comment has been minimized.

@simanongawuza simanongawuza changed the title Cape Town | 27-ITP-September | Sima Nongawuza | Sprint 2 | Coursework-sprint 2 Cape Town | 27-ITP-September | Sima Nongawuza | Sprint 2 | Coursework Sep 27, 2026
@github-actions

This comment has been minimized.

@simanongawuza simanongawuza changed the title Cape Town | 27-ITP-September | Sima Nongawuza | Sprint 2 | Coursework Cape Town | 27-ITP-September | Sima Nongawuza | Sprint 2 | Coursework-sprint 2 Sep 27, 2026
@Liam310 Liam310 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 1, 2026
@hackertainment hackertainment 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 Oct 3, 2026

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

const dir = ;
const ext = ;
const dir = filePath.slice(0, lastSlashIndex);
const ext = filePath.slice(filePath.lastIndexOf(".") + 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.

According to the definition in line 7, the . should also be part of file extension. Please fix it. Thank you.

Comment on lines +11 to +15
// ANSWER
// num represents a random whole number in the range 0 - 100.
// math.random gives a random decimal between 0 and 1.math floor rounds the value to a whole number.
// (maximum - minimum + 1) evaluates the total count of integers. (+ minimum )adds 1 to the outcome.
// The code starts by evaluating math.random then multiply that by the maximum, math.floor will then round that value into a whole number then finally adding minimum to get num.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

While your description is correct, it would be better if having a bit of explanation. For example, what does it mean by gives a random decimal between 0 and 1 (or both 0 and 1 included as well), and what is the purpose of then multiply that by the maximum, etc. Please elaborate your answer (don't need to be long, just with a little bit clarity/detail/accuracy). Thank you.

// line 1,line 2, line 7, line 8

// e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression?
// The expression changes the string to a number and removes the comma. This makes it possible for Javascript to perform subtraction since it is no longer a string No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A bit of English presentation here, should be ... removes the comma and changes the string to a number. This is because the expression is actually removing commas first before data type conversion, so it would be better to follow the same order of execution when describing it.

// It calculates the total number of whole minutes in the movie by subtracting the remainingSeconds from the total movie then divides the answer by 60 to covert seconds to minutes.
// e) What do you think the variable result represents? Can you think of a better name for this variable?

// This variable represents the movie duration in the form of hours:minutes:seconds. better name id duration.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

duration may still be not clear enough because const movieLength = 8784; can also be a kind of duration. Can you think of a better name? Thank you.

Comment on lines +34 to +37
// // const pounds = paddedPenceNumberString.substring(
// 0,
// paddedPenceNumberString.length - 2 :This takes the first digit of the number in pence since 100 pence = 1 pound therefore coverting pence to pounds
// );

@hackertainment hackertainment Oct 3, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Again, this may just be English presentation. It "takes out (or remove) the last two digits" rather than "takes the first digit". There is a minor difference between the two angles to present the same thing. While the end result is the same, the explanation can be more accurate.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Try not to modify the question formatting. This file is in markdown format so that the '##' and '`' should be preserved.

@hackertainment hackertainment 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 Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants