Question: write a program that simulates rolling a die 1,000,000 times, and prints the longest string of the same number. Ex. It rolls a 1, 2,

write a program that simulates rolling a die 1,000,000 times, and prints the longest string of the same number.

Ex. It rolls a 1, 2, 2, 2, 4, 3, 5, 5, 1, 6, 2 and outputs "3", because it rolled three 2's in a row. (this would be a very unusual outcome)

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!