Getting started with Python programming
A program is a set of instructions. A computer runs those instructions in the given sequence and produces an output (also known as a result). In this section, we will take the first steps toward writing our own small programs with the Python syntax. If you recollect, I have mentioned in the previous chapter that the MicroPython implementation is largely compatible with Python 3. In this chapter, we will explore the common syntax for Python 3 and MicroPython. To keep it simple, we won’t be exploring any features of Micro:bit and specialized MicroPython syntax.
In the previous chapter, we ran simple statements on REPL with the online Python editor, Thonny, and Mu. I prefer using the Thonny editor and will continue using it for the rest of the book, but you can use the IDE of your choice. Open any of these editors, and then open the REPL interface. I hope that you are already comfortable working with this simple interface. Let’s...