-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Computer Programming for Absolute Beginners
By :
If all of our code was simply executed in sequence, our programs would always do the same thing, no matter what data we provided them with. We must be able to control the path through the program so that some part of the code executes at the designated time, and other parts at other times, depending on the values provided by the data. For instance, only if it is cold outside do you put on warm clothes, not always. The same thing applies to our code. When things are a certain way, we want something to happen.
In a way, we can say that we, by this, will introduce some sort of intelligence, or at least some decision-making capabilities into our code. If things are this way, do this, if not, do that.
In this chapter, you will learn the following topics:
if statementsswitch statements
Change the font size
Change margin width
Change background colour