Question: python Write a program that takes a positive integer N as input and then draws N random integers in the interval [1, 6] (both ends
Write a program that takes a positive integer N as input and then draws N random integers in the interval [1, 6] (both ends inclusive). In the program, count how many of the numbers, M, that equal 6 and write out the fraction M/N. Also, print all the random numbers to the screen so that you can check for yourself that the counting is correct. Run the program with a small value for N (e.g., N = 10) to confirm that it works as intended. Hint Use random.randint(1,6) to draw a random integer between 1 and 6. Filename: count_random_numbers.py. Remarks For large N, this program computes the probability M/N of getting six eyes when throwing a die
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
