DarkMind Ltd logo

CodeNova

Python Cards Adventure

Pack 2 / Logic

comparisons and boolean logic

Lesson pack2-4

comparisons and boolean logic

not started

Hook

Boolean logic helps your code check more than one thing at once.

Comparisons like == and > return True or False.

Use and when both checks must be true.

Use or when either check is enough.

Mini Challenge

Write an if statement that prints "Play" when lives > 0 and coins >= 3.

Full lesson mode with normal detail.

Code Lab

Try it now

Output updates below

Output

Access granted

Run the code, tweak it, then beat the challenge.