Question: Instruction above using python demonstrate their knoriedge of the followu g areas: Modules (10 marks), Decision Structure ( 10 marks), Boolean Logic ( 10 marks),
demonstrate their knoriedge of the followu g areas: Modules (10 marks), Decision Structure ( 10 marks), Boolean Logic ( 10 marks), Nested Repetition Struetures (20 marks), Functions (15 marks), Arrays (15 marks) and Files (20 marks). PART B Repeatedly rolling a die would result in a uniform diveribution of values between I and 6 , inclusive. Repeatedly rolling two (2) dice would recult in a uniform distribution of values between two (2) and twelve (12) inclusive. a. In this simulation, repeatedly poll one (1) dic, count the number of occurrences of each value and plot the histogram: i. After 100 simulations. ii. After 1,000 simulatiens. b. In the next simulation, repeatedly roll four (4) dice, ram the sesults of the four (4) diee faces, count the number of occurrences of each value and plot the histogram: i. Afler too simulations. ii. After 1,000 sirvalations. Each simultascous soll of four (4) dice is conated as soc simulution. c. Compate the following probubilities based en your simulations i. If one die is rolled what is the probability that - The outcome is even? - The outcome is odd? ii. If forir dice are rolled what is the peobobility that - The total showing is even? - The total showing is odd
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
