+ 2
[Challenge] The Galton Board
The Galton Board is a triangular board of pegs starting with 1 at the top, and each row below’s # of pegs is the previous row’s #: n + 1. Balls are dropped at the top, hit the first peg and bounce either right or left to the peg below, following this pattern until reaching the bottom, filling slots equal to the # of base pegs + 1. C: Write a code randomizing the right or left bounce per row, and add the total per end slot! *Histogram works best* Good Luck! https://code.sololearn.com/c8voGlclOmrv/?ref=app
2 Antworten
+ 2
interesting challenge! here is my python code
https://code.sololearn.com/cx55eO37CfGs/?ref=app
+ 2
Very cool