The Yahtzee Engine

A hard Python mock interview question on DataDriven, with an AI interviewer who asks follow-up questions and a hire or no-hire decision at the end.

Domain
Python
Difficulty
hard
Seniority
L4

Interview Prompt

A Yahtzee scorecard needs the score a single roll of five `dice` earns in every category: 'ones' through 'sixes', 'three_of_a_kind', 'four_of_a_kind', 'full_house', 'small_straight', 'large_straight', 'yahtzee' and 'chance'. Face categories sum the dice showing that face, three and four of a kind and chance score the total of all five, and the other patterns pay their fixed bonus.

Summary

Five dice. Six faces. Score it.

How This Interview Works

  1. Read the vague prompt (just like a real interview)
  2. Ask clarifying questions to the AI interviewer
  3. Write and run your Python against test cases
  4. Answer the interviewer's follow-up questions, then get a hire or no-hire decision