Probability of Rolling a 1 First

Asked at Agoda · Coding Questions · Difficulty: Medium

Given two dice with sides numbered from 1-5 and 1-6 respectively, the game stops when a `'1'` is rolled. Calculate the probability that the 5-sided die rolls a `'1'` first and the expected number of rolls. Implement this using a Monte Carlo simulation.

Loading the problem…