Think Pair Share 5
- Due Sep 17, 2020 by 10am
- Points 1
- Submitting a file upload
- Available after Sep 16, 2020 at 10am
Think
Insert a new row just below the header in the table in your TPS Google Doc. Fill in the first two columns. Place your response to the following in the "Think" column:
We saw from the reading that the following statement will generate a random number between 0 and the maximum number an int variable can hold (231 -1) and store it in the variable x.
int x = rand();
We know that the expression a % b will produce the remainder after dividing b into a, and that its value will be in the range 0–(b-1). Using this information, how can we adjust the statement from above so that x is assigned a random value between 0 and 4, rather than 0 and 231 -1?
Pair
If you are joining the class live (in person or over Zoom), pair up with someone when asked to do so—please use Discord or your preferred means of interacting with someone to share your answers (please see the announcement with details about Discord). Settle on an answer between to two or three of you and put that answer down in your "Pair" column.
Share
Regardless of whether or not you are attending live, one person from your pair group should add your answer to the "TPS class share Links to an external site." document.
Submit
Finally, submit your personal TPS Google doc to this assignment.
Rubric
Criteria | Ratings | ||
---|---|---|---|
You uploaded your copy of the TPS Google doc
|
|
||
You made a reasonable attempt at the "thinking" portion and this was clearly marked on your document
|
|
||
You made a reasonable attempt at the "sharing" portion and this was clearly marked on your document
|
|
||
|