zuai-logo

Glossary

B

Boolean Expression

Criticality: 3

A statement in programming that evaluates to either `true` or `false`, forming the basis for decision-making and control flow.

Example:

In a game, playerScore > 100 is a boolean expression that determines if a bonus is awarded.

Boolean Value

Criticality: 3

One of the two possible outcomes of a boolean expression: `true` or `false`.

Example:

The boolean value of isLoggedIn might be true if a user has successfully authenticated.

C

Comparison Operators

Criticality: 3

Symbols used to compare two values, resulting in a boolean `true` or `false` outcome.

Example:

Using comparison operators like == or < allows you to check if a student's grade is passing.

E

Equality Operator (==)

Criticality: 3

Compares two values to check if they are identical, returning `true` if they are, and `false` otherwise.

Example:

To check if a user's input matches the secret password, you'd use userInput == secretPassword with the equality operator.

G

Greater Than Operator (>)

Criticality: 2

Compares two numerical values, returning `true` if the left operand is strictly larger than the right operand.

Example:

To see if a high score has been beaten, you'd use currentScore > highScore with the greater than operator.

Greater Than or Equal To Operator (>=)

Criticality: 2

Compares two numerical values, returning `true` if the left operand is larger than or equal to the right operand.

Example:

To grant access to users who are 18 or older, you'd use userAge >= 18 with the greater than or equal to operator.

I

Inequality Operator (!=)

Criticality: 3

Compares two values to check if they are different, returning `true` if they are not identical, and `false` otherwise.

Example:

If you want to ensure a username is not 'admin', you'd use username != "admin" with the inequality operator.

L

Less Than Operator (<)

Criticality: 2

Compares two numerical values, returning `true` if the left operand is strictly smaller than the right operand.

Example:

To determine if a player has less than 10 health points, you'd use playerHealth < 10 with the less than operator.

Less Than or Equal To Operator (<=)

Criticality: 2

Compares two numerical values, returning `true` if the left operand is smaller than or equal to the right operand.

Example:

To check if a package weight is within the limit of 50 kg, you'd use packageWeight <= 50 with the less than or equal to operator.

f

false

Criticality: 3

A boolean value indicating that a condition is not met or a statement is logically incorrect.

Example:

If isDaylight is false, the program might activate night mode.

t

true

Criticality: 3

A boolean value indicating that a condition is met or a statement is logically correct.

Example:

If temperature > 25 is true, the air conditioning will turn on.