Programming is much more than variables, functions, and calculations. If programming were as simple as those three things, computers wouldn't be anything more than giant calculators, and chances are good you wouldn't be reading this book.
What sets computers apart from other electronic calculation devices is their capability to simulate intelligence. Granted, it's the programmer who tells the computer how to behave and how and when to make decisions, but it's the computer that decides what action to take based on a set of criteria.
Making decisions is an important part of programming. At the core of decision making are conditions, and the program makes a decision based on whether or not a particular condition is met. There are a few control structures that use conditions to determine how code executes, but first let's look at how to write conditional statements.
false. A condition is said to have been met if the conditional statement results in
true; otherwise, a value of
false defines the condition as unmet. In order to get a
Lesson 2 introduced several operators: the assignment operator to give ...