Question: Write pseudocode for your algorithm? Construct a flowchart for your algorithm? Develop an algorithm to determine the probability P (expressed as a percent) of rolling

 Write pseudocode for your algorithm? Construct a flowchart for your algorithm?

Write pseudocode for your algorithm?

Construct a flowchart for your algorithm?

Develop an algorithm to determine the probability P (expressed as a percent) of rolling the same face on an n number of fair die, each with s number of sides. For example, the probability of rolling a Yahtzee (i.e., 5-of-a-kind) with five, standard six-sided die is the probability q of rolling a particular face on any one die roll (i.e., 1/6), multiplied by itself n times (i.e., 5), multiplied by the number of sides s on the die (i.e., 6), each of which could be used to give a different Yahtzec, and finally multiplied by 100%. In other words: P = (1/6)(1/6)(1/6)(1/6)(1/6) time 6 time 100 % almostequalto 0.08% In general, the formula is: P = q^n s time 100 %: where: q=1/8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!