Skip to content

London | 26-ITP-May | Rhoda Ajiroba | Sprint 1 | Structuring and Testing Data - #1560

Open
codebyra wants to merge 2 commits into
CodeYourFuture:mainfrom
codebyra:coursework/sprint-1
Open

London | 26-ITP-May | Rhoda Ajiroba | Sprint 1 | Structuring and Testing Data#1560
codebyra wants to merge 2 commits into
CodeYourFuture:mainfrom
codebyra:coursework/sprint-1

Conversation

@codebyra

@codebyra codebyra commented Jul 25, 2026

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

Completed the Sprint 1 mandatory exercises for the Structuring and Testing Data module.

Implemented the required solutions, tested the code to ensure it works correctly, and committed the changes following the sprint requirements.

@github-actions

This comment has been minimized.

3 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@codebyra codebyra changed the title Coursework/sprint 1 London | 26-ITP-May | Rhoda Ajiroba | Sprint 1 | Structuring and Testing Data Jul 25, 2026
@codebyra codebyra added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 25, 2026
@codebyra

codebyra commented Jul 27, 2026

Copy link
Copy Markdown
Author

@cjyuan, please, I would appreciate it if you could review my sprints for this module

@codebyra

Copy link
Copy Markdown
Author

@LonMcGregor Please review this too

@cjyuan cjyuan added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jul 27, 2026
Comment on lines +6 to +9
// num stores a random whole number between 1 and 100.
// Math.random() generates a random decimal between 0 and 1.
// Math.floor() rounds the number down to the nearest whole number.
// Adding minimum ensures the final result is between 1 and 100.

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.

Phrases like "a number between X and Y" are not precise enough in a program specification, because they do not clearly state whether the endpoints X and Y are included.

Could you rephrase the descriptions of the range?

Note: We could use the concise and precise interval notation to describe a range of values.

  • [, ] => inclusion
  • (, ) => exclusion

For example, X is a number in [1, 10) means, X is a number between 1 and 10, including 1 but excluding 10.

Comment on lines -1 to 2
const cardNumber = 4533787178994213;
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 12 to 22
// Read the code and then answer the questions below

// a) How many function calls are there in this file? Write down all the lines where a function call is made

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

// c) Identify all the lines that are variable reassignment statements

// d) Identify all the lines that are variable declarations

// e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression?

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 answer these questions?

  • In question (b), the error occurred because a comma was missing between the a___________s.
    What is the programming term that belongs in the blank?

@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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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