DataDriven
LearnPracticeInterviewDiscussDailyJobs

Dice Roll Scoring

A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
medium
Seniority
L5

Problem

Given exactly 5 dice values (integers 1-6), return the best score using these priorities: five-of-a-kind = 50; four-of-a-kind = 40; full-house (three of one value + two of another) = 25; three-of-a-kind = sum of all 5 dice; otherwise = sum of the dice.

Summary

The pattern rewards the patient.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.

Related

  • All Practice Problems
  • Mock Interview Mode
  • Python Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons