Start learning →

Sort the Python pieces

Exercise and reference answers

Items
  1. Group
    Decisions
    Item
    if
  2. Group
    Decisions
    Item
    else
  3. Group
    Decisions
    Item
    elif
  4. Group
    Logic
    Item
    and
  5. Group
    Logic
    Item
    or
  6. Group
    Logic
    Item
    not
  7. Group
    Order
    Item
    Precedence
  8. Group
    Order
    Item
    Brackets
  9. Group
    Order
    Item
    Left first
Groups
  1. Item
    Decisions
  2. Item
    Logic
  3. Item
    Order
Instructions
Drop each item onto decisions, logic or order.

Explanation

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

Browse more CS Olympiad questions and exercises →