In lesson 2.10 the directions told me to write: from microbit import *. Then on the next line it told me to write: display.scroll(“Ahoy”). When I ran the code, the led lights displayed Ahoy, scrolling across the screen. It was then, when I realized that I could write (almost) anything I wanted and it would appear on the led light display. Here are the things that I wrote:
If I wanted to I could have written more things, but I decided against, because I wanted to explore the micro:bit more.
In lesson 2.11 and 2.12 the directions told me to write this
from microbit import *
x = 2 + 2
display.scroll( str(x) )
When I ran the code, 4 appeared on the led display. I wanted to change the equation. Here are the equations that I wrote in place of 2 + 2:
10 + 17
100 + 24
17 + 17
100 + 22345
111 + 22345
1111 + 22345
1111 + 46
15 + 46
I wrote all of these equation and the LED display area would show the (correct) answer. It is pretty neat that the micro:bit can do math. (Maybe the computer is solving the equation, not the micro:bit.)
Freestyling with the microbits is really fun. Enjoy both following the directions and freestyling. In my opinion, freestyling is a little bit more fun.
Great feedback, Rainer. I'm glad you like freestyling. That's the main thing we want students to learn - that coding is not limited by any set of directions, but only by your imagination (which is endless). We want to give just enough directions to inspire you to make your own amazing programs!
So about the math. The micro:bit really is doing the calculations, not the PC. (I think you are very clever to realize that it might have been done on the PC, though.) You can also do multiplication and division, as well as more complex mathematics right on the micro:bit. We will make a project soon, showing how to "import math" and do lots of cool calculations :)