Index Ai Academy
Glossary · Phase 0 · Tools

Falsy

A value that counts as false in an if: 0, 0.0, "", empty collections and None.

Try it now

Watch which lines the highlight visits. The first condition is False, so Python moves to the elif. That one is True, so it runs and the else is skipped entirely. Try it again in your head with ctr = 0.01.

Learn it properly

Decisions with if/else · Compare values and choose what happens next. About 40 minutes.

Start this free lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write