O'Reilly logo

Hello World! Computer Programming for Kids and Other Beginners by Carter Sande, Warren Sande

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Remember This—Memory and Variables

What is a program? Hey, wait a minute, I thought we answered that in chapter 1! We said a program was a series of instructions to the computer.

Well, that’s true. But almost all programs that do anything useful or fun have some other qualities:

  • They get input.
  • They process the input.
  • They produce output.

Input, processing, output

Your first program (listing 1.1) didn’t have any input or processing. That’s one reason why it wasn’t very interesting. The output was the messages the program printed on the screen.

Your second program, the number-guessing game (listing 1.2), had all three of the basic elements:

  • The input was the guesses the player typed in.
  • The processing was the program checking ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required