Hello i am new to programming i trying to solve the follwing
Allow 6 different players to throw dice 100 times
The results sholuld be stored in the collection SCORES.
Read the contents of SCORES and output many times in total each number was thrown.
Also output whether or not the die is biased

Can anyone advise me on how to put this in pseudocode

Recommended Answers

Do each of the players throw the dice 100 times?

Jump to Post

All 3 Replies

Do each of the players throw the dice 100 times?

Yes each of the players throw a 100 times

really apprciate if you can help out many thanks in advance to you

Use a for loop to throw the dice 600 times
The dice_value of each throw is random.randint(1, 6)
Append these dice_values to a throw_list

Use a second for loop going through 1 to 6
Count each of these throw_values with throw_list.count(throw_value)
Append to a score_list as a (throw_count, throw_value) tuple

Now analyze the score_list with sort(), min(), max() etc.
Each trow_value (dice_value) should have been thrown 100 times, point out where it deviates the most.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.