Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialNathan Marshall
6,031 PointsWhy is the game asking to pick a number between 1 and 6, yet the answer is could still be 6?
Shouldn't the random number always be between both values 1 and 6? At the end of the video it states that the number was 6. If so how would you code this so its strict?
1 Answer
Steven Parker
231,271 PointsThe word "between" is being used to describe an inclusive range, which is perhaps more commonly indicated by the word "through" in American English.
This usage is perhaps derived from SQL, where "between" is a functional keyword that always indicates an inclusive range.
Nathan Marshall
6,031 PointsNathan Marshall
6,031 PointsThis makes a lot of sense thank you Steven!