Coding in Python

LI: to learn how to code the micro bit in Python.




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

We then created a Python coding that uses buttons, the main thing to notice is the "def" which is defining what the on_button_pressed will make the micro bit do. Again it has the top and bottom so the content can go inside it.

This task was fun because it actually felt like professional coding.


 

 

 

 

 

 

Comments

Popular posts from this blog

Inspirational Quotes

Pulleys

Maths