2016-05-27 00:24:10 +02:00
|
|
|
# dice roll quiz
|
2016-03-26 00:47:20 +01:00
|
|
|
|
2016-11-01 18:42:42 +01:00
|
|
|
Create a dice when the @boardname@ is shaken
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
## Name
|
|
|
|
|
|
|
|
## Directions
|
|
|
|
|
2016-05-27 00:24:10 +02:00
|
|
|
Use this activity document to guide your work in the [dice roll tutorial](/lessons/dice-roll/activity).
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
|
|
|
|
|
|
|
## 1. Create a variable named 'roll' that will be randomly assigned to a number between 0 and 5.
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
## 2. If the variable "roll" equals 5, write the code that will plot the image below
|
|
|
|
|
|
|
|
![](/static/mb/lessons/die-roll-0.png)
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
## 3. You will use an `else if` condition if "roll" is equal 4. Write the `else if` statement that will display the plot image below
|
|
|
|
|
|
|
|
![](/static/mb/lessons/die-roll-1.png)
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
## 4. You will use an `else if` condition if "roll" is equal 3. Write the `else if` statement that will display the plot image below
|
|
|
|
|
|
|
|
![](/static/mb/lessons/die-roll-2.png)
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
|
|
|
## 5. You will use an `else if` condition if "roll" is equal 2. Write the `else if` that will display the image below
|
|
|
|
|
|
|
|
![](/static/mb/lessons/die-roll-3.png)
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|