How Logic Works

Boolean

A data type with only two possible values: true or false.

Definition

A data type with only two possible values: true or false. Booleans are the foundation of all decision-making in programs — every if/then condition evaluates to a boolean.

Example

is_logged_in = True — this boolean variable tracks whether a user is currently logged into the system.

See it in context Learn how Boolean fits into the bigger picture of how software actually works.

Read the Guide →