Skip to content

Sheffield | ITP-Jan-26 | Hayriye Saricicek | Sprint 1 | Structuring and Testing Data#1126

Open
mshayriyesaricicek wants to merge 19 commits intoCodeYourFuture:mainfrom
mshayriyesaricicek:Sprint-1
Open

Sheffield | ITP-Jan-26 | Hayriye Saricicek | Sprint 1 | Structuring and Testing Data#1126
mshayriyesaricicek wants to merge 19 commits intoCodeYourFuture:mainfrom
mshayriyesaricicek:Sprint-1

Conversation

@mshayriyesaricicek
Copy link

@mshayriyesaricicek mshayriyesaricicek commented Mar 2, 2026

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

I am completing the exercises on Sprint 1. I am making commits as I continue.

@mshayriyesaricicek mshayriyesaricicek added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 2, 2026
Comment on lines +12 to +15

//num is a random number between 1 and 100
//Math.floor rounds the decimal number to nearest lower number
// Math.random() generates a random decimal number between 0 and 1
Copy link
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.

We can also use the concise and precise interval notation to describe a range of values.

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

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

Copy link
Author

Choose a reason for hiding this comment

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

Thank you. I have changed this now.

Copy link
Contributor

@cjyuan cjyuan Mar 3, 2026

Choose a reason for hiding this comment

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

This description is still a bit ambiguous. It doesn't quite tell me whether 0 and 1 are included in the range or not.

// Math.random() generates a random decimal number between 0 and 1

@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 Mar 2, 2026
@mshayriyesaricicek mshayriyesaricicek added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 3, 2026
Copy link
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.

Can you update the Markdown syntax of the checkboxes in the PR description to make them look like this:

  • I have tested my changes

instead of like this:

  • [X ] I have tested my changes

Comment on lines +12 to +15

//num is a random number between 1 and 100
//Math.floor rounds the decimal number to nearest lower number
// Math.random() generates a random decimal number between 0 and 1
Copy link
Contributor

@cjyuan cjyuan Mar 3, 2026

Choose a reason for hiding this comment

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

This description is still a bit ambiguous. It doesn't quite tell me whether 0 and 1 are included in the range or not.

// Math.random() generates a random decimal number between 0 and 1

Comment on lines +27 to +31
If I click ok without entering my name the prompt goes off the screen and console.log returns undefined

If I click cancel without entering my name the promptgoes off the screen and console.log null undefined

If I put my name Hayriye in and click ok then it goes off the screen and console.log returns Hayriye No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

These are all good test cases and observation.
In each case, what value does prompt() return?

Notes:

  • console.log() outputs the value you see on console; it does not return those values.
  • For more definite info about prompt(), "MDN Web Docs" is a good resource.

Copy link
Author

Choose a reason for hiding this comment

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

I have changed the markdown to ticks.
I have changed the answers in Sprint-1/1-key-exercises/4-random.js and Sprint-1/4-stretch-explore/chrome.md

@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 Mar 3, 2026
@mshayriyesaricicek mshayriyesaricicek added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 3, 2026
Copy link
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.

Changes to the code and PR description are good. Well done.

Just one more more clarification needed.


//num is a random number between 1 and 100 including 1 and 100 [1,100]
//Math.floor rounds the decimal number to nearest lower number
// Math.random() generates a random decimal number between 0 and 1 including 0 and 1 [0,1]
Copy link
Contributor

Choose a reason for hiding this comment

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

// Math.random() generates a random decimal number between 0 and 1 including 0 and 1 [0,1]

How did you figure it includes both 0 and 1? Is this information obtained from a reliable source?

Copy link
Author

Choose a reason for hiding this comment

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

I think I was getting confused. I checked on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random and I can see now it includes 0 but not 1 so have changed it on my pull request. Thank you for your patience.

@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 Mar 3, 2026
@mshayriyesaricicek mshayriyesaricicek added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 4, 2026
@cjyuan
Copy link
Contributor

cjyuan commented Mar 4, 2026

Changes look good. Well done!

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants