Posts

Showing posts with the label Microbit

Coding in Python

Image
 LI: 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.      

Coding in Python

Image
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.            

Rock, Paper, Scissors

Image
 LI: To learn how to code the Micro-bit to play rock paper scissors and understand how the flowchart matches the code Link to the DLO   1.When I shake the micro bit it will choose a random number between 1 and 3  2. I have to make a variable called hand and set this to random number 3.If the number is 1 - the Micro-bit will show the symbol for Rock 4.If the number is 2 - the Micro-bit will show the symbol for Paper 5.If the number is 3 - the Micro-bit will show the symbol for Scissors 

Flow charts and dice

Image
 LI:  To learn how to use flowcharts to plan coding