Hello World!

In Project 1, you install Python and fire up the interpreter. Project 2 gets you into Python proper, transforming you from an ordinary member of the public into a full Python programmer in training.

Tradition dictates that Hello World! be the first program that you write when you’re learning a new programming language. You’re following in the footsteps of many great programmers when you create this project.

In this project you see how to communicate information from the program to the user by making (outputting) a simple message. You see how Python remembers information and how you can name the information that you’ve asked Python to remember. This means you can reuse the information in other parts of your program.


You’ll see how Python makes its way through your programs, how to stop a program if it goes nuts, and how to make a program go a little nuts (to test how to stop it). Finally, check out some core program techniques (called loops), which you’ll use to cover the screen with greetings.

Write Hello World!

To create your Hello World! program, follow these steps:

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

    You pinned it to the menu in Project 1. You should get a prompt that looks like >>>.

    remember Code listings in this book are formatted in ...

Get Python For Kids For Dummies now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.