Skip to content
C

Problem 2: Dice Roll Event Probability

Easypython

Problem Description

Write a Python program that simulates rolling a six-sided die a given number of times, and calculates the estimated probability of rolling a number greater than 4.

Input

An integer representing the number of dice rolls to simulate.

Output

The estimated probability of rolling a number greater than 4.

Constraints

  • Number of rolls will be a positive integer.

Example Input

text
5000

Example Output

text
Estimated probability of rolling > 4: 0.33

Concepts Covered

random.randint(), conditionals, simulation-based probability.

Input (stdin)

Output

Run your code to see output here...