-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Getting Started with Raspberry Pi Zero
By :

Now that you know how to enter and run a simple Python program on Raspberry Pi Zero, let's look at some more complex programming tools. Specifically, we'll cover what to do when we want to determine the instructions to execute and how to loop our code to do that more than once. I'll give a brief introduction on how to use libraries in the Python version 2.7 code and how to organize statements into functions. Finally, we'll very briefly cover object-oriented code organization.
Indentation in Python is very important; it will specify which group of statements is associated with a given loop or decision set, so watch your indentation carefully.
As you have seen in previous examples, your programs normally start by executing the first line of code and then continue with the following lines until the program runs out of code. But, what if you want to decide between two different courses of action? We can...
Change the font size
Change margin width
Change background colour