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 7. Decisions, Decisions

In the first few chapters, we saw some of the basic building blocks of a program. We can now make a program with input, processing, and output. We can even make our input and output a little fancier by using a GUI. We can assign the input to a variable, so we can use it later, and we can use some math to process it. Now we’re going to start looking at ways to control what the program does.

If a program did the same thing every time, it would be a little boring and not very useful. Programs need to be able to make decisions on what to do. We’re going to add some different decision-making techniques to our processing repertoire.

Testing, testing

Programs need to be able to do different things based on their input. ...

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