Skip to content

Conversation

@zilinskyte
Copy link

@zilinskyte zilinskyte commented Oct 13, 2025

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

Changelist

Completed all practice questions for sprint 1 coursework backlog

Questions

@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-1) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@zilinskyte zilinskyte changed the title West Midlands | September 2025 | Georgina Rogers | Sprint-1 | Coursework West Midlands | September 2025 | Georgina Rogers | Sprint-1 | Coursework-sprint-1 Oct 13, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-1) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@zilinskyte zilinskyte changed the title West Midlands | September 2025 | Georgina Rogers | Sprint-1 | Coursework-sprint-1 West Midlands | September 2025 | Georgina Rogers | Sprint-1 | Coursework/sprint-1 Oct 13, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-1) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@zilinskyte zilinskyte changed the title West Midlands | September 2025 | Georgina Rogers | Sprint-1 | Coursework/sprint-1 West Midlands | 25-Sept-ITP | Georgina Rogers | Sprint-1 | Coursework/sprint-1 Oct 13, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-1) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@zilinskyte zilinskyte changed the title West Midlands | 25-Sept-ITP | Georgina Rogers | Sprint-1 | Coursework/sprint-1 West Midlands | 25-Sept-ITP | Georgina Rogers | Sprint-1 | Coursework/Sprint-1 Oct 13, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-1) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@zilinskyte zilinskyte changed the title West Midlands | 25-Sept-ITP | Georgina Rogers | Sprint-1 | Coursework/Sprint-1 West Midlands | 25-Sept-ITP | Georgina Rogers | Sprint-1 | Coursework-Sprint-1 Oct 13, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-1) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@zilinskyte zilinskyte changed the title West Midlands | 25-Sept-ITP | Georgina Rogers | Sprint-1 | Coursework-Sprint-1 West Midlands | 25-Sept-ITP | Georgina Rogers | Sprint-3 | Coursework-Sprint-1 Oct 13, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-3) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@zilinskyte zilinskyte changed the title West Midlands | 25-Sept-ITP | Georgina Rogers | Sprint-3 | Coursework-Sprint-1 West Midlands | 25-Sept-ITP | Georgina Rogers | Sprint 1 | Coursework-Sprint-1 Oct 13, 2025
@github-actions
Copy link

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@zilinskyte zilinskyte changed the title West Midlands | 25-Sept-ITP | Georgina Rogers | Sprint 1 | Coursework-Sprint-1 West Midlands | 25-Sept-ITP | Georgina Rogers | Sprint 1 | Coursework/Sprint-1 Oct 13, 2025
@github-actions
Copy link

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@zilinskyte zilinskyte changed the title West Midlands | 25-Sept-ITP | Georgina Rogers | Sprint 1 | Coursework/Sprint-1 West Midlands | ITP Swpt 25 | Georgina Rogers | Sprint 1 | Structuring and Testing Data Oct 13, 2025
@github-actions
Copy link

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@zilinskyte zilinskyte changed the title West Midlands | ITP Swpt 25 | Georgina Rogers | Sprint 1 | Structuring and Testing Data West Midlands | ITP Sept 25 | Georgina Rogers | Sprint 1 | Structuring and Testing Data Oct 14, 2025
@zilinskyte zilinskyte added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 16, 2025
@sambabib sambabib 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 20, 2025
@zilinskyte
Copy link
Author

@sambabib hi, I see you have changed the label to "in review" a week ago, but I don't see any comments about the work. Please let me know. Thank you

@sambabib
Copy link

@sambabib hi, I see you have changed the label to "in review" a week ago, but I don't see any comments about the work. Please let me know. Thank you

hi, apologies. thanks for the nudge, I am reviewing it right now. I have done a fair bit of travelling this week.

let initials = ``;

// https://www.google.com/search?q=get+first+character+of+string+mdn
let initials = firstName[0] + middleName[0] + lastName[0];

Choose a reason for hiding this comment

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

this simple solution works, so well done! however, there might be a better way to do this. think about if you ever had a lot more name variables and you had to provide a solution that automatically populates the initials.

const dotIndex = base.lastIndexOf(".");
const ext = base.slice(dotIndex);
// dotIndex finds position of the last . in the base string and slice extracts after this
console.log(`The base part of the file path is ${base}, the dir part is ${dir}, and the ext part is ${ext}`);

Choose a reason for hiding this comment

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

solid solution. shows that you understand the slice() method and how to use it on strings.

// num is an integer between minimum and maximum, between 1 and 100 inclusive
// math.random() produces a decimal between 0 (inclusive) and 1 (exclusive)
// math.floor() rounds down to the nearest integer
// (maximum - minimum + 1)) + minimum chooses a number between minimum and maximum and adds 1 so its inclusive of maximum

Choose a reason for hiding this comment

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

good explainer.

// Then try updating the expression last4Digits is assigned to, in order to get the correct value

// slice is a method that works on strings, not numbers.
// To fix the error, we can convert cardNumber to a string using the toString() method before calling slice.

Choose a reason for hiding this comment

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

good catch. but if the variable is given as a number and you have converted toString(), you should make a conversion back, so you can return a number. when you begin to work with strongly-typed languages, cardNumber may not be of type string. this is where you must return the original variable type unless otherwise stated.

// Line 10: console.log(`The percentage change is ${percentageChange}`) prints percentage change to output

// b) Run the code and identify the line where the error is coming from - why is this error occurring? How can you fix this problem?
// Line 5 is missing a comma in the replaceAll function call. This is causing a syntax error because the function expects two arguments, but only one is provided.

Choose a reason for hiding this comment

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

good catch.


// e) What do you think the variable result represents? Can you think of a better name for this variable?
// The variable result represents the total length of the movie in hours, minutes and seconds.
// A better name for this variable could be movieDuration or movieFormattedLength.

Choose a reason for hiding this comment

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

movieDuration makes for better reading. ideally, we always want to keep our variable names as clear as possible so the meaning can be inferred at first glance.

having said that, movieFormattedLength also works because it piggybacks off the initial movieLength declaration. however, movieFormattedLengthToMinutes might be better, since we can easily tell what it's been formatted to.

// For 399, start index is character 1 (the first 9) so this returns 99.
.padEnd(2, "0");
// Ensures pence string has at least 2 characters by adding trailing zeros if needed
// So 5p would become 005 and this would return 05.

Choose a reason for hiding this comment

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

excellent explanation.

@sambabib sambabib 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 Oct 25, 2025
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