Children have truly inquisitive minds. My Mom tells me that when I was young, I had beeb asking a million questions a day. Children tend to do that. It is not easy to provide kids with answers that will be interesting to inspire them. But let's give it a shot, shall we?
What's the difference between toaster and Raspberry PI?
Unlike a toaster, Raspberry PI can do more than one thing It's because Raspberry PI is a computer.
What do computers do?
Computers run computer programs.
What is a computer program?
It is a recipe which computer carries out step by step. Instructions are understood by computer (you must use a programming language). It is by no means different from giving instructions to a person. For instance:
- Sit comfortably on the couch.
- Turn on TV
- Grab the black controller.
- If in your hands: press this button. Otherwise you must have dropped it, then pick it up and press this button.
- Move cursor to this menu.
- Turn off PlayStation.
- Turn off TV.
- Put controller back on the shelf.
- Repeat tomorrow.
How do I write a computer program?
Just like English or any other language is used to communicate with other people, you can use programming language to tell computer what to do. It has rules that you need to learn. We will run it in the text editor and execute (execute = tell the computer to run it).
Which programming language are we going to use?
We are going to use Python. Google engineers use it, NASA uses it. It's really cool and powerful.
Look at the Raspberry PI desktop now. This is what you are going to use. You can access Python interpreter clicking Menu/Programming/Python2 (idle) or Python3 (idle). This opens Python interpreter. You can use it to type commands and accepting them with Enter. We will do that shortly.
Or you can click terminal window on a tool bar and type python (or python3). I will show you that later.
What's Python interpreter?
It is a program that translates your program into language understood by your computer (called machine language).
Ready for the ride?
Let's write our first program (go next).