Thursday, July 1, 2021

Coding in python

 LI:To learn to code the microbot 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.



2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. hi Afa i really like coding its really fun but what site did you code on and next time can you might be able to add a picture of what it does.Bye :)

    ReplyDelete