2018年8月24日星期五

Coin Flipper

Coin Flipper

Step 1

Place a on button pressed block to run code when button A is pressed.

Step 2

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.

Step 3

Place a show icon block under the if and pick one of the images.

Step 4

Click 下载 to transfer your code in your micro:bit and press button A to try it out.

Step 5

Place multiple show icon blocks before the if to create a coin flipping animation.

Step 6

Click 下载 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.

没有评论:

发表评论

精选博文

How to Make a Counter with microbit

How to Make a Counter with microbit When we have boarded airplane, we often encounter a situation like this: a beautiful stewardess ca...