[Challenge] The Galton Board | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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

19th May 2018, 11:53 AM
Nathan Lewis
Nathan Lewis - avatar
2 Respostas
+ 2
interesting challenge! here is my python code https://code.sololearn.com/cx55eO37CfGs/?ref=app
20th May 2018, 7:01 PM
tamaslud
tamaslud - avatar
+ 2
Very cool
20th May 2018, 3:24 AM
Matthew Johnson
Matthew Johnson - avatar