Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Friday, August 6, 2021

Coding with Python

 Learning Intention

To see and understand the connection between the written code, the block code and the flow chart.

This is the comparison between the Python coding, the blocks and the flowchart for making the Microbit act like a dice.



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.