Change docs to randomInt
This commit is contained in:
@ -23,7 +23,7 @@ We are going to create a meter that displays a random number from *0* to *10*. W
|
||||
|
||||
```blocks
|
||||
input.onPinPressed(TouchPin.P0, () => {
|
||||
let x = Math.random(10)
|
||||
let x = Math.randomInt(10)
|
||||
})
|
||||
|
||||
```
|
||||
@ -33,7 +33,7 @@ Finally, let's show that number on the @boardname@. You are registering an event
|
||||
|
||||
```blocks
|
||||
input.onPinPressed(TouchPin.P0, () => {
|
||||
let x = Math.random(10)
|
||||
let x = Math.randomInt(10)
|
||||
basic.showNumber(x)
|
||||
})
|
||||
|
||||
|
@ -8,7 +8,7 @@ You should work on these challenges after the following the [love meter activity
|
||||
|
||||
```blocks
|
||||
input.onPinPressed(TouchPin.P0, () => {
|
||||
let x = Math.random(10)
|
||||
let x = Math.randomInt(10)
|
||||
basic.showNumber(x)
|
||||
})
|
||||
|
||||
@ -21,7 +21,7 @@ Add a pause of 3000 milliseconds (3 seconds) after showing the number so that th
|
||||
|
||||
```blocks
|
||||
input.onPinPressed(TouchPin.P0, () => {
|
||||
let x = Math.random(10)
|
||||
let x = Math.randomInt(10)
|
||||
basic.showNumber(x)
|
||||
basic.pause(3000)
|
||||
})
|
||||
@ -34,7 +34,7 @@ If the rating **x** is between *0* and *3* (strictly less than *4*), display the
|
||||
|
||||
```blocks
|
||||
input.onPinPressed(TouchPin.P0, () => {
|
||||
let x = Math.random(10)
|
||||
let x = Math.randomInt(10)
|
||||
basic.showNumber(x)
|
||||
basic.pause(3000)
|
||||
if (x < 4) {
|
||||
@ -49,7 +49,7 @@ input.onPinPressed(TouchPin.P0, () => {
|
||||
|
||||
```blocks
|
||||
input.onPinPressed(TouchPin.P0, () => {
|
||||
let x = Math.random(10)
|
||||
let x = Math.randomInt(10)
|
||||
basic.showNumber(x)
|
||||
basic.pause(3000)
|
||||
if (x < 4) {
|
||||
|
@ -23,7 +23,7 @@ input.onPinPressed(TouchPin.P0, () => {
|
||||
## 3. What does this line of code doing?
|
||||
|
||||
```blocks
|
||||
let x = Math.random(9)
|
||||
let x = Math.randomInt(9)
|
||||
```
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@ Answer the questions below while completing the activity. Pay attention to the d
|
||||
## 3. Describe what this line of code does?
|
||||
|
||||
```blocks
|
||||
let x = Math.random(9)
|
||||
let x = Math.randomInt(9)
|
||||
```
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user