Question: Create a loop that roll a 1 2 sided dice 5 0 times. Using an array, count how many times each side is rolled. output
Create a loop that roll a sided dice times. Using an array, count how many times each side is rolled. output the results.
input none
output array results
start
SIDES
rollsSIDES
forcount ; count ; count
roll random
rollsroll
end for
fori ; i SIDES; i
output i rolled rollsi times."
end for
end
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
