Python for Kids: Python 3 – Project 4
May 15, 2016 1 Comment
Some people want to use my book Python for Kids for Dummies to learn Python 3. I am working through the code in the existing book, highlighting changes from Python 2 to Python 3 and providing code that will work in Python 3.
If you are using Python 2.7 you can ignore this post. This post is only for people who want to take the code in my book Python for Kids for Dummies and run it in Python 3.
Using Python3 in Project 4 of Python For Kids For Dummies
Project 4 introduces the IDLE integrated development environment. When you download and install a version of Python 3 for Windows (I tested version 3.4.4) you should get a folder called Python 3.4 (or whatever version you installed) in your Start Menu. In that folder should be an entry called IDLE (Python 3.4 GUI – 32 bit). If you run that you will be launched into the Python 3.4 equivalent of the IDLE mentioned in the book.
The good news is that pretty much everything in this project is the same for Python 3. That’s partly because the project is mainly concerned with introducing the IDLE environment and the concept of storing code in a file. IDLE in Python 3 has all of the features listed in Project 4 as for Python 2.7:
Syntax highlighting (page 87)
Tab Completion (page 88/89)
Command history (page 90/91)
The IDLE Editor Window (page 92-95)
Comments (page 95-98)
Saving files (page 98)
Commenting out code (page 98-100) (the same commenting format -> # or triple quotes for docstrings “”” are the same in Python 3)
Indenting and dedenting code (page 101-102)
You should be able to breeze through Project 4 using Python 3.