Book Image

Raspberry Pi Projects for Kids

By : Daniel Leonard Bates
Book Image

Raspberry Pi Projects for Kids

By: Daniel Leonard Bates

Overview of this book

Table of Contents (11 chapters)

Hello world!


As is traditional when we learn about a new technology, we're going to start with the simplest program possible, just to make sure that we understand the basics. In this case, we're going to create a basic window with a title and some text inside.

Tkinter

There are many different Python modules available that let us create graphical programs, but we're going to use one called Tkinter. This module is included with Python by default and works on almost all computers and operating systems.

Tkinter has easy-to-use functions to create textboxes, buttons, scroll bars, menus, and more. Collectively, these components are called widgets. To create a graphical user interface, we combine a number of widgets with a layout, which tells Tkinter how the widgets should be arranged. For example, we could say that all of the buttons should be in a row or that they should be arranged vertically.

There is a summary of how to use the available widgets in the Extensions section at the end of this chapter...