London | JAN-2026 ITP | Ebrahim Moqbel | Sprint 1 | Coursework#1074
London | JAN-2026 ITP | Ebrahim Moqbel | Sprint 1 | Coursework#1074Ebrahim-Moqbel wants to merge 13 commits intoCodeYourFuture:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| // This should produce the string "CKJ", but you must not write the characters C, K, or J in the code of your solution. | ||
|
|
||
| let initials = ``; | ||
| let initials = `the initials is ${firstName.charAt(0)}, ${middleName.charAt(0), lastName.charAt(0)}`; |
There was a problem hiding this comment.
What the description on lines 5-6 mean is:
If we output the value of
initialsafter line 8, we should seeCJKin the output.
Currently, we would see the initials is .... instead of CJK.
There was a problem hiding this comment.
I have made a new commit with the changes.
Sprint-1/1-key-exercises/4-random.js
Outdated
| // math.random will generate a random number between (0,1) inclusivly | ||
| // (maximum - minimum + 1) provide a range of generated random number | ||
| // num is a random whole number (1,100) inclusivly |
There was a problem hiding this comment.
Using the interval notation, we could express
math.random will generate a random number between (0,1) inclusivly
as
Math.random() returns a random number in [0, 1).
[0, 1)means, include 0, exclude 1.- No need to further specify inclusively or exclusively.
- Less wordy, more precise.
We could do the same to
num is a random whole number (1,100) inclusivly
Sprint-1/1-key-exercises/4-random.js
Outdated
| // math.floor will make the number as a whole and remove any decimals or more likely to round the the nearest whole number | ||
| // math.random returns a random number in [0,1) | ||
| // (maximum - minimum + 1) provide a range of generated random number | ||
| // num is a random whole number [1,100) |
There was a problem hiding this comment.
Can the value of num be 100? That is, canthe generated random number include 100?
There was a problem hiding this comment.
No the notation ( , ) would exclude the number therefore 100 wouldn't be generated.
There was a problem hiding this comment.
You figured out Math.random returns a random number in [0, 1).
Can you use the interval notation to describe what each of these expressions does, and the range of the numbers it may produce?
Math.random() * (maximum - minimum + 1)Math.floor(Math.random() * (maximum - minimum + 1))Math.floor(Math.random() * (maximum - minimum + 1)) + minimum
|
What about this comment: #1074 (comment) Please note that in CYF courses, the recommended way to inform the reviewer of your changes is to do both of the following:
|
Learners, PR Template
Self checklist
Changelist
completed all of the bellow filles :
Key exercises
Mandatory errors
Mandatory interpret
Stretch exploration
Questions
N/A