Skip to content

London | 26-ITP-May | Zadri Abdule | Sprint 1 | Coursework#1300

Open
Zadri415 wants to merge 27 commits into
CodeYourFuture:mainfrom
Zadri415:coursework/sprint-1
Open

London | 26-ITP-May | Zadri Abdule | Sprint 1 | Coursework#1300
Zadri415 wants to merge 27 commits into
CodeYourFuture:mainfrom
Zadri415:coursework/sprint-1

Conversation

@Zadri415
Copy link
Copy Markdown

@Zadri415 Zadri415 commented May 5, 2026

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

Completed all of the tasks for Sprint 1 of Module Structuring & Testing Data.

@github-actions

This comment has been minimized.

@Zadri415 Zadri415 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. labels May 5, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label May 5, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@Zadri415 Zadri415 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label May 5, 2026
Copy link
Copy Markdown
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

Code looks good. I just have a few comments.


// 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
// The = sign on line 3 means assignment. It takes whatever is on the right side, works it out, and then stores that result into a variable on the left. So count = count + 1 means take the current value of count, add 1, and then save that back into count.
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.

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

Comment on lines +12 to +17
// Math.random() returns a random decimal number between 0 and 1
// (maximum - minimum + 1) represents the size of range of numbers we want to include. We add +1 because both minim and maximum are included in the range
// Math.random() * (maximum - minimum + 1) gives us a random decimal between 0 and 100, but still decimal
// Math.floor() rounds down to the nearest whole number. So this. turns decimals like 99.9 into 99
// + minimum since minimum = 1, this shifts the entire random range up by 1. so instead of 0-100, the range becomes 1-100
// num should return a random integer between 1 and 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.

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.

One way to concisely and precisely describe a range of values is to use the math's interval notation:

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

For example, [1, 10) means, all numbers between 1 and 10, including 1 but excluding 10.

@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 May 11, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants