Skip to content

Language

Sign in

Stack: last in, first out: activity sheet

Goal: Push, pop and peek on a stack built on a Python list and see why the last item in is the first out.

You need: Only the simulation is needed. A pile of books or plates works as a real-world stack.

Safety: No special safety needs.

  1. Push three items.
  2. Pop once and see which item leaves.
  3. Peek and compare with pop.
  4. Pop until the stack is empty and see the message.
My observations
OperationStack after (bottom to top)

Use your browser's Print option to print this page.

Ask Flint AI
EduFlint: learn and play for free