How does this work?
Just click on Editor in the main menu and select a coding environment. In this example we used PXT.
Within the code-menu, Input you will find "On Button A Pressed". Just click on it to select it.
What should Happen next? We need to tell the mini that it has to decide which image it should show.
To really have a unknown answer, we have to Set a variable.
You want to select between two possible answers (Yes or No), therefore we will select "Pick Random 0 to 4" from the Math block.
Now change 4 to 1 (0 counts as well, so we have two numbers to chose from).
To define the image that should be shown when a number has been selected you need to select the "If true / then" code from the logic bar.
You will need to ask for 0 or 1, therefore the number from the variable needs to be selected.
Now select the right image. To draw images you'll need the block "show leds" from the basic bar. A click on the boxes changes their Status from not lightning to shining red!
Done! Now save your script and view it in the simulator.
If it's like you intended you can Hit the download button and save it to your mini.
Go ahead and ask your Friends what they think – and build an even better script!