← All lessons

Bool: True and False

Sign in · Sign up

Lesson 2.0

A program also has "yes" and "no" — that's True and False. They are written with a capital letter and no quotes.

is_ready = True
has_homework = False

This type is called bool. Without quotes, True is a value; in quotes, "True" is just text.

Create three variables: is_ready, is_teen and has_homework — and print each one.

The first two are "yes", the third is "no", in this order: True, True, False.

Hint

True and False are written without quotes and with a capital letter: True is a value, while "True" is already text.

Create three variables, the first two with the value True, the third with False, and print each one with its own print, in the same order.