Embercode
✕
Dynamic ProgrammingQuick quiz

Dice probability

7 questions. Covers Probability and counting DP with modulo in Python.

Questions 1 to 5 of 7

  1. 1. Two six-sided dice are thrown. There are 36 equally likely outcomes. How many of them have a total of 7?

    Type a number.

  2. 2. Why does count_totals take % MOD after each addition?
  3. 3. Three six-sided dice are thrown. How many of the 216 outcomes have a total of 10?

    Type a number.

  4. 4. What does this program print? ``python big = 2_000_000_000 print(big + big) ``
  5. 5. Using the modulus 1000000007, the probability of a total of 7 with two six-sided dice is two[7] * inverse % MOD, where inverse is the inverse of 36. What modular value does this give?

    Type a number.

5 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.