Skip to content

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

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

London | 26-ITP-May | Mandip sanger | Sprint 1 | Coursework#1516
mandipsanger wants to merge 11 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
@@ -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

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

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 Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants