Skip to main content
🔒 Preview mode. The first 15 Foundations lessons are free; this one is Pro. Start a 7-day trial to unlock the editor, AI hints and the rest of the curriculum. Card required, cancel any time in Dashboard.Start 7-day trial →
← CoursesInterview PrepModule 6 · Concurrency, OS, ML Interview TopicsGIL: when threads help and when they don'tquiz85 / 104
+100 XP
Task
📝 **Task:** Build \`star_format(situation, task, action, result)\` returning a 4-part bulleted answer ready to recite: - Format: \`"S: <situation>\\nT: <task>\\nA: <action>\\nR: <result>"\` (newline-separated, in S/T/A/R order). - Strip leading/trailing whitespace from each field. - Reject any field that's empty after stripping → return \`"INCOMPLETE"\` (interviewers can smell a missing R). - All four present → return the formatted answer. The shape forces you to lead with the situation and CLOSE with a measurable result — the #1 fix for rambling behavioral answers. 📋 Implement the function above. Test cases run automatically. 💡 **Hint:** Re-read the theory if you get stuck — the pattern is right there.
🎯 Quiz

Question

📝 **Task:** Build \`star_format(situation, task, action, result)\` returning a 4-part bulleted answer ready to recite: - Format: \`"S: <situation>\\nT: <task>\\nA: <action>\\nR: <result>"\` (newline-separated, in S/T/A/R order). - Strip leading/trailing whitespace from each field. - Reject any field that's empty after stripping → return \`"INCOMPLETE"\` (interviewers can smell a missing R). - All four present → return the formatted answer. The shape forces you to lead with the situation and CLOSE with a measurable result — the #1 fix for rambling behavioral answers. 📋 Implement the function above. Test cases run automatically. 💡 **Hint:** Re-read the theory if you get stuck — the pattern is right there.

💬 Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…