Chapter 5. Variables, decisions, and procedures
In this chapter, we’ll experiment with three powerful programming ideas. First we’ll look at how programs can remember and use pieces of information using variables. You’ll learn how programs can ask questions and make decisions using comparison operators and control blocks. Then we’ll look at how you can split up programs into reusable chunks called procedures, and why you will want to do this. Along the way, we’ll also look at some debugging and commenting tools that will help you troubleshoot pesky errors (programmers spend lots of their time doing this).
Remembering useful things
Often you’ll want an app to remember something that just happened so it can do something else later. Here are ...