subject

Write a program that evaluates the random distribution of a dice. The game should first prompt the client for a number of die throws that he would like. The game then throws the die that many times. The game records the number of times each die number appears on top and calculates the average for the six values. The program then computes the percent difference between the average and the number for each die face value. Use at least three methods: One for input, one for processing and one for output. Allow the client to repeat the game as many times as she wishes. A sample run of the game would look like this: This game requests a number from the player.
The game then throws the die that number of times.
The game then displays the percentage difference between the number for each die face value and the average
Please enter the number of times that you would like the computer to throw the dice.

The number of throws is 1200 with the average of 200.
The percentage from the average for each diece number is:
Dice number 1 landed 206 times and is 3% above the average.
Dice number 2 landed 204 times and is 2% above the average.
Dice number 3 landed 194 times and is 3% below the average.
Dice number 4 landed 192 times and is 4% below the average.
Dice number 5 landed 193 times and is 3.5% below the average.
Dice number 6 landed 211 times and is 5.5% above the average.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
)a grad student comes up with the following algorithm to sort an array a[1..n] that works by first sorting the first 2/3rds of the array, then sorting the last 2/3rds of the (resulting) array, and finally sorting the first 2/3rds of the new array. 1: function g-sort(a, n) . takes as input an array of n numbers, a[1..n] 2: g-sort-recurse(a, 1, n) 3: end function 4: function g-sort-recurse(a, `, u) 5: if u ⒠` ≤ 0 then 6: return . 1 or fewer elements already sorted 7: else if u ⒠` = 1 then . 2 elements 8: if a[u] < a[`] then . swap values 9: temp ↠a[u] 10: a[u] ↠a[`] 11: a[`] ↠temp 12: end if 13: else . 3 or more elements 14: size ↠u ⒠` + 1 15: twothirds ↠d(2 ◠size)/3e 16: g-sort-recurse(a, `, ` + twothirds ⒠1) 17: g-sort-recurse(a, u ⒠twothirds + 1, u) 18: g-sort-recurse(a, `, ` + twothirds ⒠1) 19: end if 20: end function first (5 pts), prove that the algorithm correctly sorts the numbers in the array (in increasing order). after showing that it correctly sorts 1 and 2 element intervals, you may make the (incorrect) assumption that the number of elements being passed to g-sort-recurse is always a multiple of 3 to simplify the notation (and drop the floors/ceilings).
Answers: 3
question
Computers and Technology, 22.06.2019 04:30
Eye injuries usually occur as a result of all of the following things, except: a) proper machine operation b) battery explosion c) falling or flying debris d) electric welding arc
Answers: 2
question
Computers and Technology, 23.06.2019 00:20
Ihave been given the number of guns per 100, and the total firearm-related deaths per 100,000. i have to find the actual number of guns per country and actual number of gun-related deaths. if somebody could show me how to do 1 question, i can finish the rest, i am just confused. tia
Answers: 3
question
Computers and Technology, 24.06.2019 02:40
Has anyone seen my grandma shes been gone for 4 years already
Answers: 1
You know the right answer?
Write a program that evaluates the random distribution of a dice. The game should first prompt the c...
Questions
question
Mathematics, 08.02.2020 14:42
question
Mathematics, 08.02.2020 14:42
question
Mathematics, 08.02.2020 14:42
Questions on the website: 13722367