Python for Kids: Bonus Project 1
October 24, 2016 Leave a comment
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.
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).