Sort the Python pieces
Exercise and reference answers
- Items
- Group
- Decisions
- Item
- if
- Group
- Decisions
- Item
- else
- Group
- Decisions
- Item
- elif
- Group
- Logic
- Item
- and
- Group
- Logic
- Item
- or
- Group
- Logic
- Item
- not
- Group
- Order
- Item
- Precedence
- Group
- Order
- Item
- Brackets
- Group
- Order
- Item
- Left first
- Groups
- Item
- Decisions
- Item
- Logic
- Item
- Order
- Instructions
- Drop each item onto decisions, logic or order.
Explanation
_Source: OpenStax Introduction to Python Programming, Chapter 4._