Write a program that animates the bean machine introduced in Exercise. The animation terminates after ten balls are dropped, as shown in Figure.
The bean machine, also known as a quincunx or the Galton box, is a device for statistics experiments named after English scientist Sir Francis Galton. It consists of an upright board with evenly spaced nails (or pegs) in a triangular form, as shown in Figure


(b and c) The balls are dropped into the bean machine.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.