Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions Variables/Boolean operators/task.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
## Boolean operators

Boolean is a type of value that can only be `True` or `False`. The `==` (equality) operator
compares two variables and checks whether they are equal. You will learn more about boolean operators in a later [task](course://Condition expressions/Boolean operators).
compares two variables and checks whether they are equal. Use `!=` (not equal) to check that two values differ.

**Examples:**
```python
2 == 2 # 2 equals 2 → True
5 != 6 # 5 is not equal to 6 → True

2 == 4 # 2 does not equal 4 → False
5 != 5 # 5 equals 5 → False
```

You will learn more about boolean operators in a later [task](course://Condition expressions/Boolean operators).

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6025?utm_source=jba&utm_medium=jba_courses_links).

### Task
- Check whether the variable `two` is equal to `three`.
In this task, insert only these tokens where needed: `==`, `!=`, `True`, `False`.
The `is` operator checks if two objects are the same – for example, whether a variable is identical to `True` or `False`.
- Check whether the variable `two` is equal to `three`. This will create a Boolean result stored in `is_equal`.
- Check if the variable `is_equal` has a deceiving name.
- Check if the variable `is_false` does indeed contain a lie.

Expand Down