Start learning →

Slice the true results

Exercise and reference answers

Does not match the category
  1. a = b
  2. x += 1
  3. print
  4. input
Matches the category
  1. a == b
  2. x > 0
  3. not p
  4. p or q
  5. p and q
Instructions
Slice only the expressions that give a Boolean. Spare the rest.

Explanation

_Source: OpenStax Introduction to Python Programming, Chapter 4._
Continue learning with Quill →

Browse more CS Olympiad questions and exercises →