Pages

Showing posts with label coding. Show all posts
Showing posts with label coding. Show all posts

Thursday, July 1, 2021

Coding In Python

L.I : To Learn how to code the Microbot in the Phyton.

 Here is an example of the buttons,  the main thing to notice is "def" which is defining what the on_button_pressed will make the microbot do. Again this has a top and bottom so the content has to go insde it. 

   

The first one image shows the Phyton coding for the flashing hearts code that I made. It flashes between a small heart icon and a large heart Icon. The diference between python coding is that block coding uses blocks and python coding uses text that you have to type down.


Thursday, June 24, 2021

Rock Paper Scissors

LI To learn how to code the microbit to play rock papaer scissors and understand how the flowchart matches the code.

Link to DLO




1. When I shake the microbit it will choose a random number between 1 and 3

2. I have to make a variable called hand and set this to the random number.

3. If the number is 1 - the microbit will show the symbol for paper

4. If the number is 2 - the microbit will show the symbol for rock

5. If the number is 3 - the microbit will show the symbol for scissors

Thursday, June 10, 2021

Building an mBot

 LI To understand how the mbot is put together so that ican fix it when something goes wrong .


Today, we took an mBot apart and then ressmbled it .we then tested it with some code to make sure that





it worked correcty here are the parts of the mBot that look apart.