Skip to content

London | 26-ITP-May | Eyob Zeray | Sprint 1 | course work#1543

Open
eyob-tech wants to merge 1 commit into
CodeYourFuture:mainfrom
eyob-tech:coursework/sprint-1
Open

London | 26-ITP-May | Eyob Zeray | Sprint 1 | course work#1543
eyob-tech wants to merge 1 commit into
CodeYourFuture:mainfrom
eyob-tech:coursework/sprint-1

Conversation

@eyob-tech

Copy link
Copy Markdown

London | 26-ITP-May | Eyob Zeray | Sprint 1 | Structuring and Testing Data

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 Sprint 1 exercises: key exercises (count, initials, paths, random), fixed all mandatory errors, and answered the interpretation questions for percentage change, time format, and pence-to-pounds conversion.

@github-actions

This comment has been minimized.

@eyob-tech eyob-tech changed the title Complete Sprint 1 key exercises, mandatory errors, and interpret exer… London | 25-ITP-May | Eyob Zeray | Sprint 1 | Structuring and Testing Data Jul 21, 2026
@eyob-tech eyob-tech changed the title London | 25-ITP-May | Eyob Zeray | Sprint 1 | Structuring and Testing Data London | 26-ITP-May | Eyob Zeray | Sprint 1 | Structuring and Testing Data Jul 21, 2026
@eyob-tech eyob-tech 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 21, 2026
@eyob-tech eyob-tech changed the title London | 26-ITP-May | Eyob Zeray | Sprint 1 | Structuring and Testing Data London | 26-ITP-May | Eyob Zeray | Sprint 1 | course work Jul 21, 2026
@hackertainment hackertainment 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 22, 2026
// Try breaking down the expression and using documentation to explain what it means
// It will help to think about the order in which expressions are evaluated
// Try logging the value of num and running the program several times to build an idea of what the program is doing
// num is a random whole number between 1 and 100. Math.random() gives a decimal between 0 and 1, multiplying it stretches that range to 0-100, Math.floor rounds it down to a whole number, and + minimum shifts it so the lowest possible value is 1 instead of 0.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your answer is generally correct and I can also basically understand the meaning. Just the clarity can be improved a bit, for example:

  • "whole number" may better be expressed in standard mathematical term "integer";
  • "Math.random() gives a decimal between 0 and 1" would actually be including 0 but excluding 1;
  • after multiply, "it stretches that range to 0-100" including 0 but excluding 100;
  • after rounding, it becomes an integer within the range 0-99 including 0 and including 99;
  • after adding minimum, "shifts it so the lowest possible value is 1" and also the highest possible value is 100;
  • and as a result, num would be a random integer generated between minimum and maximum inclusive.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks so much for taking the time to review this and for the detailed feedback! That really helps clarify things - especially the point about inclusive/exclusive ranges, I hadn't thought about it that precisely. I'll keep "integer" and that level of detail in mind for future explanations. Really appreciate it!

@hackertainment

hackertainment commented Jul 22, 2026

Copy link
Copy Markdown

Your answers or code fixes for this exercise look pretty well - except the Sprint-1/1-key-exercises/4-random.js which may need a bit refinement in your explanation. Since this is your first submission, I leave some hints for your future reference instead of asking you to redo. Hope you may learn "attention to details" and "how to present your answers" from this exercise. Keep up your good work.

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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants