Tag: Coding

Tech | Coding – Blocks v Python

This week for tech, we learnt how to code the microbit. We first started by learning to use the blocks on the microbit site. The blocks we used were the forever block and the show leds block. The show leds block are used to make instructions that will show on the microbit. The forever block goes around the block to flash the heart and makes sure the instructions keep going.

Next, we attempted to do the same but using python. When doing the tutorial, you would need to copy the code at the top and it needs to be exactly the same as the code otherwise it might mess up the pictures that will flash on the microbit. The forever PYTHON is two lines of code that go around the other instructions at the top and bottom. Everything inside the PYTHON forever LOOP is INDENTED. Once we completed it, we used the blocks and picked pictures that will show on the microbit, and then we can check the code that makes the flashing picture.

 

I enjoyed this session because it gave me an opportunity to learn different ways to show a flashing hear and other pictures on the microbit site.