-
-
Notifications
You must be signed in to change notification settings - Fork 274
Pawel Broilo I Structuring and Testing Data Types I Sprint 1I Key Exercises #432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
<!-- You must title your PR like this: COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK For example, NW4 | Carol Owen | HTML-CSS-Module | Week1 Complete the task list below this message. If your PR is rejected, check the task list. --> ## Learners, PR Template Self checklist - [ ] I have committed my files one by one, on purpose, and for a reason - [ ] I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK - [ ] I have tested my changes - [ ] My changes follow the [style guide](https://curriculum.codeyourfuture.io/guides/contributing/) - [ ] My changes meet the [requirements](./README.md) of this task ## Changelist Briefly explain your PR. ## Questions Ask any questions you have for your reviewer.
|
Hi Pawel, good naming of commits, but I think you are missing |
| //Equal sign in second expression means a sum firt variable + second variable ie. 0+1= 1 | ||
| // 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 | ||
| // Line 3 adds 1 to the current value of count. No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good explanation!
| let firstName = "Creola"; | ||
| let middleName = "Katherine"; | ||
| let lastName = "Johnson"; | ||
| var initials = firstName[0] + middleName[0] + lastName[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good answer, but line 8 will throw an error since you have already declared initials
| // Create a variable to store the dir part of the filePath variable | ||
| // Create a variable to store the ext part of the variable | ||
| var ext=base.slice(base.lastIndexOf(".")+1) | ||
| const dir = filePath.slice(0, lastSlashIndex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again there's a duplicate of dir, this will throw errors when running the script. After removing that, it works well.
| // Math.random generates a random number. | ||
| // 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 | ||
| console.log(num); No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So by breaking down what num is doing, what is it doing first?
|
Hi,
I appreciate your positive comments of Pull Request #432.
I think Its Sally McGrath a Cohort for all exercises. I will submit all
remaining exercises for Step 2 and Step 3. I will include all links to Pull
Requests in Google Docs. I will submit.them this weekend. Thank you.
Best Regards,
Pawel Broilo
…On Fri, 28 Mar 2025, 16:08 Prabhveer, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Random.js
<#432 (comment)>
:
> @@ -0,0 +1,13 @@
+const minimum = 1;
+const maximum = 100;
+
+const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
+
+// In this exercise, you will need to work out what num represents?
+//num is a random number between 1 and 100.
+// Try breaking down the expression and using documentation to explain what it means
+// Math,floor round number to nearest integer
+// Math.random generates a random number.
+// 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
+console.log(num);
So by breaking down what num is doing, what is it doing first?
—
Reply to this email directly, view it on GitHub
<#432 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVFFPRUZDL2TYRWPEAV2R232WVQVDAVCNFSM6AAAAABZ7N5IT2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDOMRWGAZDMOJSGU>
.
You are receiving this because you authored the thread.Message ID:
<CodeYourFuture/Module-Structuring-and-Testing-Data/pull/432/review/2726026925
@github.com>
|
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.