Log in from a computer to take this course

You'll need to log in from a computer to start Learn Python 2. But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store
Learn

The boolean operator and returns True when the expressions on both sides of and are true. For instance:

  • 1 < 2 and 2 < 3 is True.
  • 1 < 2 and 2 > 3 is False.

Instructions

1.

Let’s practice with and. Assign each variable to the appropriate boolean value.

  • Set bool_one equal to the result of
False and False
  • Set bool_two equal to the result of
-(-(-(-2))) == -2 and 4 >= 16 ** 0.5
  • Set bool_three equal to the result of
19 % 4 != 300 / 10 / 10 and False
  • Set bool_four equal to the result of
-(1 ** 2) < 2 ** 0 and 10 % 10 <= 20 - 10 * 2
  • Set bool_five equal to the result of
True and True

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?