Skip to content

London | 26-ITP-May | Mandip sanger | Sprint 1 | Coursework#1516

Open
mandipsanger wants to merge 15 commits into
CodeYourFuture:mainfrom
mandipsanger:sprint1
Open

London | 26-ITP-May | Mandip sanger | Sprint 1 | Coursework#1516
mandipsanger wants to merge 15 commits into
CodeYourFuture:mainfrom
mandipsanger:sprint1

Conversation

@mandipsanger

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

Changelist

added tasks from sprint1

@mandipsanger mandipsanger added 🏕 Priority Mandatory This work is expected Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. labels Jul 15, 2026
@hey-hammad hey-hammad 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 Jul 16, 2026
Comment thread Sprint-1/2-mandatory-errors/3.js Outdated
@@ -1,9 +1,12 @@
const cardNumber = 4533787178994213;
const cardNumber = "4533787178994213";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suppose you're not allowed to modify the original value. How would you achieve this using code alone?

const 12HourClockTime = "8:53pm";
const 24hourClockTime = "20:53";

// 12 Hour clock time is a string that represents the time in 12-hour format, while 24hourClockTime is a string that represents the time in 24-hour format.

@hey-hammad hey-hammad Jul 16, 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.

please review this code again, you need to fix the error in the file.

const result = `${totalHours}:${remainingMinutes}:${remainingSeconds}`;
console.log(result);
// There are 6 variables declared in this program: movieLength, remainingSeconds, totalMinutes, remainingMinutes, totalHours, and result.
// There are 4 function calls in this program: console.log(), and the three arithmetic operations used to calculate remainingSeconds, totalMinutes, and remainingMinutes.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

please review this answer again, and double-check what counts as a function call in JavaScript

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.

count is how many time fuction been called. In this case its result been called only once.

// Interpret line 4, the expression assigned to totalMinutes calculates the total number of minutes in the movie by subtracting the remaining seconds from the total length of the movie and dividing by 60.
// The variable result represents the formatted string of the movie length in hours, minutes, and seconds. A better name for this variable could be formattedMovieLength or movieLengthString.
// This code will work for all values of movieLength, as it correctly calculates the hours, minutes, and seconds regardless of the total length of the movie. However, if movieLength is negative, it may not produce a meaningful result.
// experimenting with different values of movieLength, such as 2:25.833, 1:23:20, will show that the code correctly formats the length of the movie in hours, minutes, and seconds for all positive values.

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 testing a wider range of values and consider whether there are any inputs that produce unexpected output or formatting.

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.

the range is only allowed in seconds


// To begin, we can start with
// 1. const penceString = "399p": initialises a string variable with the value "399p"
// const penceString = "399p": initialises a string variable with the value "399p"

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 start, but please play around with the code and try explaining the rationale behind each step. For example, why is padding needed here?

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.

Thank you I will look into these again

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.

Padding is used to make sure the number has the correct number of digits before it is split into pounds and pence.padStart(3, "0") adds zeros to the beginning of the string until it is at least 3 characters long.

@hey-hammad hey-hammad 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 Jul 16, 2026
@mandipsanger mandipsanger removed the Reviewed Volunteer to add when completing a review with trainee action still to take. label Jul 16, 2026
@github-actions

Copy link
Copy Markdown

The files changed in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the 'files changed' tab at the top of the page.

Here is an example of a file that has been changed on this branch but shouldn't be: Sprint-2/1-key-errors/0.js

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

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@mandipsanger mandipsanger added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 16, 2026
@github-actions

Copy link
Copy Markdown

The files changed in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the 'files changed' tab at the top of the page.

Here is an example of a file that has been changed on this branch but shouldn't be: Sprint-2/1-key-errors/0.js

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

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 16, 2026
// call the function capitalise with a string input
// interpret the error message and figure out why an error is occurring

// function capitalise(str) {

@hey-hammad hey-hammad Jul 17, 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.

please remove the sprint 2 changes from this PR. Thanks

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.

Sorry thank you letting me know.

@hey-hammad hey-hammad added the Reviewed Volunteer to add when completing a review with trainee action still to take. label Jul 17, 2026
@github-actions

Copy link
Copy Markdown

The files changed in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the 'files changed' tab at the top of the page.

Here is an example of a file that has been changed on this branch but shouldn't be: Sprint-2/1-key-errors/0.js

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

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Structuring-And-Testing-Data The name of the module. 🏕 Priority Mandatory This work is expected 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.

2 participants