Getting Started Guide

CLASS 4
60
Commentary
Mole game question 2 commentary
Did you make the program where computer calls 1 or 2 continuously and the user have to input the last number
that computer calls? Was it working well? If it did, just take this commentary as helpful advice and move on to the
next page. If it didn’t work out as you wanted, use the script below.
Since you have to select one or two numbers, use the random number block
to find a random number between 1 and 2. If the generated random number is
equal to 2, create a tricky random number, sound the number to be played by
the trick first, and proceed to the code in the previous example.
The code above is a PlayTrick code with a reduced number of ‘If~’ blocks.
Reducing the code is good for readability, so it's good to be able to codify
coding to reduce the length of the code.
The whole script can be found at http://www.robotori.com/web_eng -> Moretips
-> Manual ->EDU ->Logic boost CODING CLASS 4 ->download whole script
<Generate 1 or 2 random and trick numbers>
<Play trick 3>