Place a on button pressed
block to run code when button A is pressed.
Place a if block and check the value returned by the pick random true or false
block. pick random true or false
returns true
or false
randomly.
Place a show icon
block under the if and pick one of the images.
Click Download
to transfer your code in your micro:bit and press button A to try it out.
Place multiple show icon
blocks before the if to create a coin flipping animation.
Click Download
to transfer your code in your micro:bit and press button A to try it out! Link of the whole program: https://makecode.microbit.org/_0o73M1Ldw9ka
This article comes from Coin Flipper.
DownLoad Url osoyoo.com