Teach Your Kids To Code: A Parent-friendly Guide to Python Programming
Python Setup for Windows, Mac, and Linux 275 Try Out Python Go to your Launchpad and click IDLE, or go to Finder 4 Applications ...
276 Appendix A Figure A-22: Configuring preferences in IDLE Now you’re ready to tackle Chapters 1 through 7. To use the programs ...
Python Setup for Windows, Mac, and Linux 277 Figure A-23: Installing Python 3 on a computer running Lubuntu Linux Search for py ...
278 Appendix A Figure A-25: IDLE, the Python shell program Test IDLE by running it and typing 2 + 3 and pressing enter. Type pr ...
B Pygame SetuP for WindoWS, mac, and Linux After installing Python (see Appendix A), you’ll want to install Pygame to run the an ...
280 Appendix B Pygame for Windows For Windows, we’ll use Pygame 1.9.2 for Python 3.2 (see Appendix A for help setting up Python ...
Pygame Setup for Windows, Mac, and Linux 281 When the download finishes, open your Downloads folder to find the pygame-1.9.2a0. ...
282 Appendix B The program should find your Python 3.2.5 installation from Appendix A. Select Python 3.2 from registry. Click N ...
Pygame Setup for Windows, Mac, and Linux 283 Figure B-7: Open IDLE from the Start menu. In the Python shell editor, type import ...
284 Appendix B Pygame for Mac Installing Pygame on a Mac is more complicated than on a PC. You have three options: If you have ...
Pygame Setup for Windows, Mac, and Linux 285 Figure B-9: Install Python 2.7. The installation process for Python 2.7 should be ...
286 Appendix B Run the Pygame installer by holding down the control key, clicking the file, and selecting Open with 4 Installer ...
Pygame Setup for Windows, Mac, and Linux 287 Pygame for Linux Similar to installing Pygame on a Mac, you have two options for Py ...
288 Appendix B Search for python-pygame. Check the box next to python- pygame in the search results and click Apply to complete ...
C Building Your own Modules Throughout this book, you’ve imported modules like turtle, random, and pygame into your programs to ...
290 Appendix C To create a reusable module, we write the module in IDLE’s file editor window just like other program files we’ve ...
Building Your Own Modules 291 This module imports the turtle module and defines a function called cspiral() for drawing colorful ...
292 Appendix C Figure C-1: Two colorful spirals created with a three- line program, thanks to the colorspiral.py module With the ...
Building Your Own Modules 293 (between 3 and 6), the size of the spiral (between 25 and 75), and the x- and y-coordinates to dra ...
294 Appendix C Additional Resources The official documentation for Python at http://docs.python.org/3/ includes more information ...
«
8
9
10
11
12
13
14
15
16
17
»
Free download pdf