Loading interview...
The Yahtzee Scorer
A medium Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Python
- Difficulty
- medium
- Seniority
- junior, mid
Interview Prompt
Our game analytics engine scores Yahtzee hands. Write a function called yahtzee_score that takes a list of 5 dice values (1-6) and a category string, and returns the score. Categories: 'ones' through 'sixes' (sum of matching dice), 'three_of_a_kind' (sum of all dice if 3+ match, else 0), 'four_of_a_kind' (sum of all dice if 4+ match, else 0), 'full_house' (25 if three of one and two of another, else 0), 'chance' (sum of all dice).
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your python solution with real code execution
- Get instant feedback and a hire/no-hire decision