Python for Kids: Bonus Project 1


In these posts I outline the contents of each project in my book Python For Kids For Dummies. If you have questions or comments about the project listed in the title post them here. Any improvements will also be listed here.

Bonus Projects!

Did you know that, in addition to the projects in my book, there are an addition 3 bonus projects available online? Hello GUI World, a Spline Drawing Program and Minecraft+Py+Pi. They were originally intended to be included in the book, but then they didn’t fit (which is a shame, since they were the book’s apotheosis). Happily for you though, they’re now online! – and there’s over 100 pages of extra material ! – it’s like you’re getting an extra third of the book! You can even do them even if you don’t have the book! It’s so exciting!! Follow the link in the sidebar to get them, even if you think I’ve overdone the exclamation points!!!

What’s in Bonus Project 1 (Hello GUI World!)

The body of the book lays the foundation for this project and Bonus Project 2. In this project you get to escape the shackles of the command line and create a graphical user environment (GUI) using the Tkinter widget toolkit that is included with Python.

This Project introduces the concept of a widget and introduces you to Label and Button widgets. You learn about callbacks. These are what you need to program in order for something to happen when you click the a button (for example). You learn how to change the configuration of widgets. This allows you, for example, to change the text that is displayed in the widget and the color of a widget.

Since you also need to know how to arrange different widgets in a window, the Project also covers the two main geometry managers (grid and pack). You’re shown how to open and close Tkinter applications and how to use the premade dialog boxes that come with Tkinter (tkMessageBox and tkFileDialog).

Improvements:
If you want to extend yourself, the accompanying cheatsheet contains a list of widgets, with some sample code needed to get the widgets working.
None atm.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: