London | 26-ITP-May | Mandip sanger | Sprint 1 | Coursework#1516
Open
mandipsanger wants to merge 11 commits into
Open
London | 26-ITP-May | Mandip sanger | Sprint 1 | Coursework#1516mandipsanger wants to merge 11 commits into
mandipsanger wants to merge 11 commits into
Conversation
hey-hammad
reviewed
Jul 16, 2026
| @@ -1,9 +1,12 @@ | |||
| const cardNumber = 4533787178994213; | |||
| const cardNumber = "4533787178994213"; | |||
There was a problem hiding this comment.
Suppose you're not allowed to modify the original value. How would you achieve this using code alone?
hey-hammad
reviewed
Jul 16, 2026
| 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. |
There was a problem hiding this comment.
please review this code again, you need to fix the error in the file.
hey-hammad
reviewed
Jul 16, 2026
| 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. |
There was a problem hiding this comment.
please review this answer again, and double-check what counts as a function call in JavaScript
hey-hammad
reviewed
Jul 16, 2026
| // 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. |
There was a problem hiding this comment.
try testing a wider range of values and consider whether there are any inputs that produce unexpected output or formatting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
added tasks from sprint1