Um momento
0x10Lesson 2 of 11

Structure answers with STAR

Tell focused stories: Situation, Task, Action, Result.

20 min 5-question quiz 1 code exercise
By the end of this lesson you can
  • Structure an answer with Situation, Task, Action, and Result.
  • Spend most of your answer on your actions.
  • End with results and what you learned.

The STAR method gives every answer a clear arc, so the interviewer can follow it and find the evidence they need. It keeps you from rambling through background and forgetting to say what happened in the end.

The four parts

  • Situation (about 10%): the context in one or two sentences. Team, project, stakes.
  • Task (about 10%): your responsibility or the problem you had to solve.
  • Action (about 60%): what you did, step by step, and why. This is where the interviewer finds the evidence for the competency.
  • Result (about 20%): the outcome, measured if possible, plus what you learned or would do differently.
story.py
1story = {
2    "Situation": "Checkout errors spiked after a release.",
3    "Task": "As on-call, I had to restore service and find the cause.",
4    "Action": "I rolled back, bisected the diff, and added a missing null check.",
5    "Result": "Errors fell to zero in 20 minutes; I added a test and an alert.",
6}
7for part, text in story.items():
8    print(f"{part[0]}: {text}")
Output
S: Checkout errors spiked after a release.
T: As on-call, I had to restore service and find the cause.
A: I rolled back, bisected the diff, and added a missing null check.
R: Errors fell to zero in 20 minutes; I added a test and an alert.

A good STAR answer takes about two minutes. Explaining why you chose each action - “I rolled back first because restoring service mattered more than diagnosis” - shows judgment, which is often what the question is really probing. Close with the result and a lesson, then stop and let the interviewer ask follow-ups.

Key takeaways

  • Situation and Task set context briefly.

  • Action is the heart of the answer: what you did and why.

  • Result closes the story with outcomes and lessons.

Lesson quiz

5 questions · pass with 4 correct · up to 50 XP

Passing this quiz completes the lesson and keeps your streak going. Questions you miss come back in review sessions later.

Practice: sharpen your stories

Use short Python programs to check your story structure, time your answers, and quantify impact. These exercises run locally in your browser.

Exercise 1

Check a story’s STAR structure

+25 XP

Read a count n, then n lines, each starting with a label S:, T:, A:, or R:. If the labels are exactly S, T, A, R in that order, print complete. If any of the four labels is missing, print missing: followed by the missing labels in STAR order, separated by spaces (for example missing: T R). Otherwise print reorder.

  • Complete story
  • Missing parts
  • Out of order
main.py
Loading editor…

Python runs in a sandboxed browser worker with a 60 second time limit. Its runtime loads from the Pyodide CDN; your code stays in this browser.

Questions about this lesson

Stuck? Ask. Figured something out? Share it. Explaining is one of the best ways to learn.

Loading posts…

Gostou da aula? 😆👍
Apoie nosso trabalho com uma doação: