7. Write a Python script which estimates the probability that when rolling a pair of standard, 6-sided dice, the outcome
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
7. Write a Python script which estimates the probability that when rolling a pair of standard, 6-sided dice, the outcome
7. Write a Python script which estimates the probability that when rolling a pair of standard, 6-sided dice, the outcome is that both dice individually have a face value less than some integer k. Your code should print the estimated probability for every integer k satisfying 1 <k <6. For k = 3, the exact (theoretical) result is 20.111. Exact results differ for other integers k satisfying 1 <k < 6. Page 4 of 8 znment 1 (including rubric) ENGG1003- Introduction to Procedural Programming Hint: estimate the probability by simulating N rolls of a pair of dice. Count how many times both dice are less than k, then divide this count by the total number of rolls. For a large value of simulated rolls (eg: N = 10“), this ratio should be very close to the exact result.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!