Skip to content

London | 26-ITP-May |Rizqah Popoola| Sprint 1 | Coursework#1436

Open
risikatpopoola wants to merge 3 commits into
CodeYourFuture:mainfrom
risikatpopoola:coursework/Sprint1.0
Open

London | 26-ITP-May |Rizqah Popoola| Sprint 1 | Coursework#1436
risikatpopoola wants to merge 3 commits into
CodeYourFuture:mainfrom
risikatpopoola:coursework/Sprint1.0

Conversation

@risikatpopoola

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

This PR is for coursework sprint 1

@risikatpopoola risikatpopoola added 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. 📅 Sprint 1 Assigned during Sprint 1 of this module labels Jul 1, 2026

// Line 1 is a variable declaration, creating the count variable with an initial value of 0
// Describe what line 3 is doing, in particular focus on what = is doing
// In Line 3, count is a variable, and the = is an assignment operator that stores the result of the operation(Addition) No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Operation like count = count + 1 is very common in programming, and there is a programming term describing such operation.

Could you find out what one-word programming term describes the operation on line 3?

const dir = ;
const ext = ;

const dir =filePath.slice(0, filePath.lastIndexOf("/")+1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should the "dir" part include a trailing slash?

Comment on lines +10 to +12
//The math.Floor method rounds a number to the nearest integer, so using bodmas,
//the expressions are evaluated, the minimum which equals 1 is added to 1 then subtracted from maximum(100), after which it is multiplied by
//a random number between 0-1 exclusive and then rounded down to the nearest integer after which the minimum is added. The values produced ranges from 0-100 No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The values produced ranges from 0-100

This description is not quite correct.

Could the value of num be 0 or 100?

Comment on lines +2 to 3
const cardNumber = '4533787178994213';
const last4Digits = cardNumber.slice(-4);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suppose you were not allowed to modify the statement const cardNumber = 4533787178994213;
(that is, keep the variable's value unchanged).
How would you modify the code (through type conversion) to still being able to use .slice(-4) to extract the last 4 digits from the given number.

Comment on lines +1 to +2
const TwelveHourClockTime = "8:53pm";
const TwentyFourHourClockTime = "20:53";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In JS naming convention, variable names usually begins with a lowercase letter. Names starting with an uppercase letter are used for built-in and custom data types (e.g., Math)


// 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, it was missing a comma between the characters that are to be replaced so to fix the problem, include a comma

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Instead of saying something like, 'a comma is missing between "," and "" in the function call', we could also say: A comma is missing between the ___________s.

What is this programming term that refers to the values passed to a function? It begins with an 'a'.

//The expression assigned to totalMinutes means that the remaining seconds are subtracted from the movieLength and then divided by 60 to get the total number of minutes in the movie length.

// 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 time of the movie, in hours minutes and seconds. A better name for this variable could be totaltime

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The name totalTime does not quite indicate the value stored in the variable
is a formatted string in the form "2:12:02".

Could you suggest a more descriptive name?

Comment on lines 20 to +21
What is the return value of `prompt`?
the input entered

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What if a user enters a name and then click "Cancel" instead of "OK"?

Comment on lines +18 to +21
What does `console` store? The console object provides access to the debugging console. It stores text and data explicitly sent to it using methods like console.log() or console.info()
What does the syntax `console.log` or `console.assert` mean?
The assert() method writes a message to the console if an expression evaluates to false. The log() method writes (logs) a message to the console.
In particular, what does the `.` mean?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you also describe what . in console.log mean?

Note: The console object does not stores the text or data passed to its methods.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 3, 2026
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. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants