Friday, July 2, 2021

Coding in Python

 Learning Intention

To learn how to code the Microbit in Python.


This first one shows the Python coding for a flashing heart. It flashes between a small heart icon and a large heart icon. The main thing to notice between the Python coding and the blocks is that the forever loop is at the top and bottom of the content in both.



For this example for coding the buttons, the main thing to notice is the "def" which is defining what the on_button_pressed will make the microbit do. Again this has a top and bottom so the content has to go inside it.






No comments:

Post a Comment