A good answer might be:

Enter your age
16
Child rate
Enjoy the show

Boolean Expressions

OperatorMeaning
A == B is A equal to B ?
A < B is A less than B ?
A <= B is A less than or equal to B ?
A > B is A Greater than B ?
A >= B is A Greater than or equal to B ?
A != B is A not equal to B ?
Table of Relational Operators

We need to look at the condition part of the if statement. Usually this will be a boolean expression. Recall that an expression is is a combination of literals, operators, variables, and parentheses used to calculate a value.

A boolean expression is an expression that evaluates to true or false.

Boolean expressions often make comparisons between numbers. A relational operator says what comparison you want to make.

Notice several details (that will be really annoying later on if you forget about them): the operator for "equal" is == (two equal signs in a row.) In your web browser it may be hard to see that there are two equal signs. The operator for "not equal" is != (exclaimation point equal sign.)


QUESTION 11:

As practice, fill in the blanks in the following chart:

Expression ValueExpression Value
25 == 25 25 != 25
25 <= 25 25 > 25
25 >= 25 25 = 25
-5 < 7 -305 <= 97