+ 9
[ASSIGNMENT] BEAN MACHINE
task in this challenge is to create simulation of bean machine or quincunx,which is consists of an upright board with evenly spaced nails in triangular form. balls are dropped from the opening of the board. every time a ball hit a nail, it goes left or right. balls are accumulated in the slots. write a problem which takes as input number of balls and slots and then guess the numbers of balls in each slots. Good luck. https://code.sololearn.com/c3zFTSaXT3Az/?ref=app
3 Answers
+ 2
Do you mean something like that ?
https://code.sololearn.com/WaybIcSwRifj/?ref=app
+ 2
My python bean machine
https://code.sololearn.com/czuP9UM7L3vk/#py
+ 1
Java bean machine
https://code.sololearn.com/c0zl9wc3dp21/?ref=app