Python For Kids For Dummies book cover

Python For Kids For Dummies

Author:
Brendan Scott
Published: September 8, 2015

Overview

The kid-friendly way to learning coding with Python

Calling all wanna-be coders! Experts point to Python as one of the best languages to start with when you're learning coding, and Python For Kids For Dummies makes it easier than ever. Packed with approachable, bite-sized projects that won't make you lose your cool, this fun and friendly guide teaches the basics of coding with Python in a language you can understand. In no time, you'll be installing Python tools, creating guessing games, building a geek speak translator, making a trivia game, constructing a Minecraft chat client, and so much more.

Whether you don't have the opportunity to take coding classes at school or in camp—or just simply prefer to learn on your own—Python For Kids For Dummies makes getting acquainted with this popular coding language fast and easy. It walks you step-by-step through basic coding projects and provides lots of hands-on tasks that give you a sweet sense of accomplishment when you complete them. What's not to love about that?

  • Navigate the basics of coding with the Python language
  • Create your own applications and games
  • Find help from other Python users
  • Expand your technology skills with Python

If you're a pre-to-early-teen looking to add coding skills to your creativity toolbox, Python For Kids For Dummies is your sure-fire weapon for getting up and running with one of the hottest programming languages around.

The kid-friendly way to learning coding with Python

Calling all wanna-be coders! Experts point to Python as one of the best languages to start with when you're learning coding, and Python For Kids For Dummies makes it easier than ever. Packed with approachable, bite-sized projects that won't make you lose your cool, this fun and friendly guide teaches the basics of coding with Python in a language you can understand. In no time, you'll be installing Python tools, creating guessing games, building a geek speak translator, making a trivia game, constructing a Minecraft chat client, and so much more.

Whether you don't have the opportunity to take coding classes at school or in camp—or just simply prefer to learn on your own—Python

For Kids For Dummies makes getting acquainted with this popular coding language fast and easy. It walks you step-by-step through basic coding projects and provides lots of hands-on tasks that give you a sweet sense of accomplishment when you complete them. What's not to love about that?

  • Navigate the basics of coding with the Python language
  • Create your own applications and games
  • Find help from other Python users
  • Expand your technology skills with Python

If you're a pre-to-early-teen looking to add coding skills to your creativity toolbox, Python For Kids For Dummies is your sure-fire weapon for getting up and running with one of the hottest programming languages around.

Python For Kids For Dummies Cheat Sheet

Python coding helps you with things you do every day, like math homework. Python programming can also help with things like making web pages: Thank goodness for widgets and keywords!

Articles From The Book

18 results

Python Articles

How to Install Python on Your Computer

Whether you use a Mac, Windows, or Linux OS (operating system), you can find and install Python on your computer. The following sections give you instructions for each OS.

How to install Python on Mac OSX

To find and start Python on Mac OSX computers, follow these steps:
  1. Press Cmd+spacebar to open Spotlight.

  2. Type the word terminal.

    Or, from the Finder, select Finder→Go→Utilities→Terminal.

    The Terminal window opens.

  3. In the terminal, type python.

    The Python interpreter that's built in to Mac OSX opens.

How to install Python on Windows

Unfortunately, Python doesn't come on Windows. If you're running Windows, then you need to download and install Python by following the instructions here. Installing Python on Windows isn't difficult. If you can download a file from a website, you have the skills to install Python. Fortunately, the Python Foundation (the peeps who guide the development of Python) makes installable files available from its website.

Firefox and Internet Explorer responded differently to the Python download website, so the instructions are based on which of these browsers you use. If you use a whole other browser altogether, try the Internet Explorer instructions.

Installing with Firefox

To install Python on a Windows machine with Firefox, follow these steps:
  1. Visit www.python.org/downloads.

  2. Click the button that says Download Python 2.7.9.

    Or, if it's there, click a more recent version number that starts with 2.7.

    Clicking this button automatically downloads and saves an msi file for you. If not, try the instructions for Internet Explorer. See Figure 1.

    Figure 1: Download Python with Firefox.
  3. When the download's complete, click the icon for Firefox's download tool.

  4. Click the file called python-2.7.9.msi (or the more recent version, if you downloaded one).

    Python 2.7.9 installs on your computer.

Installing with Internet Explorer

To install Python on a Windows machine with Internet Explorer, follow these steps:
  1. Visit www.python.org/downloads.

  2. From the menu bar, select Downloads→Windows.

    You can see the menu options in Figure 2.

    Figure 2: Download Python with Internet Explorer.
  3. Scroll down to the heading Python 2.7.9-2014-12-10.

    Or scroll to a more recent version, which starts with Python 2.7, if one is available.

  4. Under this heading, click the link titled Download Windows x86 MSI Installer.

    See Figure 3. This is a link for a 32-bit installation, which makes things work better with third-party libraries. Use the 32-bit installer even if you have a 64-bit machine and even if you have no idea what this paragraph is talking about.

    Figure 3: Python x86 MSI Installer.
  1. If you're asked to choose whether to run or save the file, choose Run.

    This downloads python2.7.9.msi and starts running the installer.

  2. If you get a security warning when the installer begins (or at random times during the installation), choose Run.

  3. Accept the default installation options that the installer provides.

How to install Python for Linux

If you're running Linux, confirm that you have version 2.7.9 of Python installed, rather than version 3. This shouldn't be a problem because Python 2.7 is installed by default in recent versions of OpenSuSE, Ubuntu, and Red Hat Fedora.

In the nutty odd case when someone has Python 3 but not Python 2.7, read your distribution's documentation for how to use the package manager and get Python 2.7 and IDLE.

Python Articles

Write a Simple Program in Python

Tradition dictates that Hello World! be the first program that you write when you're learning a new programming language like Python. You're following in the footsteps of many great programmers when you create this project. To create your Hello World! program, follow these steps:

  1. Open your Start menu and choose Python (command line).

    You should get a prompt that looks like >>>.

    At the moment, you're doing everything in interactive mode in the Python interpreter. That's where the >>> comes in. Python shows you >>> when you're supposed to type something.

  2. At the prompt, type the following. Use a single quote at the start and the end — it's beside the Enter key:

    print('Hello World!')
  3. Press the Enter key.

    Python runs the code you typed.

You see the output shown in Figure 1. Congratulations — you've written your first program. Welcome to the Python-programmers-in-training club.
If you don't see what's in Figure 1, check that you typed in the text from Step 2 exactly as it's written:
  • Check that the parentheses and single quotes are in the right places.

  • Check that for each opening parenthesis there is a closing parenthesis. (Otherwise, you're left hanging.

  • Check that for each opening quote there's a closing quote.

Programming languages have their own grammar and punctuation rules. These rules are the language's syntax. Humans, can work most stuff out even if perfect not you're is grammar (See? You figured out what that sentence was trying to say), but Python pretty much freaks out if you get the syntax wrong.

Python Articles

Use Python to Help with Your Math Homework

Python can do fractions so you can check your homework answers. Use the fractions module, and its Fraction object, specifying the numerator and denominator. To get one-half, type fractions.Fraction(1, 2). For four-fifths, type fractions.Fraction(4, 5):

>>> import fractions
>>> one_half = fractions.Fraction(1, 2)
>>> one_fifth = fractions.Fraction(1, 5)

Fractions can do normal fraction calculations (including multiplication and division) for you:

>>> one_half+one_fifth
Fraction(7, 10)
>>> one_half-one_fifth
Fraction(3, 10)
>>> one_half*one_fifth
Fraction(1, 10)
>>> one_half/one_fifth
Fraction(5, 2)