pxt-calliope/olddocs/lessons/guess-the-number/tutorial.md
Tom Ball f4eca66648 move lessons out of web site
will move select lessons back to "educators" section
2016-06-14 11:49:58 -04:00

434 B

guess the number tutorial

~avatar avatar

This tutorial will help you create a guess the number game! Let's get started!

~

Rebuild the game!

The blocks have been shuffled! Put them back together so that...

  • when the user presses button A,
    • generate a random number
    • show the number on screen
input.onButtonPressed(Button.A, () => {
    let x = Math.random(10)
    basic.showNumber(x)
})