Chapter 3- Data Types and Operators Boolean Expressions Page 2 3 4

Introduction

The If Statement Page 2 3 4 5 6 7 8 9
Arithmetic Operations Page 2 3 4 5 6 Boolean Operators and Nested If Statements Page 2 3 4 5 6 7
Events and Sequential Processing Page 2 3 4 5 More Examples Page 2 3 4 5 6 7 8 9 10 11 12
Datatypes and Conversions Page 2 3 4 5 6 7 Using Check Box and Option Controls Page 2 3 4 5 6 7 8 9 10
Variable Declarations - Local and Global Page 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Exercises Page 2 3 4 5 6 7 8
Chapter 4- Selection Statements Review Questions
Introduction

4-6: More on Nested If Statements

Exercise 4-4: Improving the Guessing Game (continued)

Testing the Program

Wrap up this example by completing the code and testing the program. Make sure that the interface works correctly. You should have assigned True or False to the Enabled property of the Check It button at appropriate places in the code, for example.

Notice that we have not tried to validate user input, and that consequently the program crashes if the user enters data that is not a number.