Conclusion

By using if statements we can check whether a condition is true or false and act on it, allowing us to make any number of decisions. Understanding if statements and the various options such as else and elseif is critical to writing useful programs. Be sure to spend some time experimenting with the programs in this section - try changing values and see what happens, also adjust the expressions and see how it affects the outcome.