Check Your Computer Science IQ Before you begin this chapter, see what you already know about computer science by taking the chapter pretest. The pretest is available at a a www.g-wlearning.com. Computers themselves are very simple machines. They can perform very few actions on o their own. They can store a program and its data, t follow instructions provided in a program, add two numbers, and make a decision. The decisions a a computer makes are based on the algorithms driving d the code. Programmers take care to correctly co od e the algorithms. To make decisions, a program needs to know w the choices. These are programmed into the code. T Th en the program needs to know what will happen if each e choice is made. All of this is controlled by the logicg coded into the program based on the algorithms. s The decision-making process is represented in an a algorithm by using three simple English words: I IF , THEN, and ELSE. How are Boolean expressions or operators used in everyday life? 99
Previous Page Next Page