Skip to content

Instantly share code, notes, and snippets.

@NickGeek
Last active December 8, 2015 05:09
I made a Python script for the ball counting problem in this video https://www.youtube.com/watch?v=ffUnNaQTfZE
urn = []
i = 0
tmpI = 0
started = False
while 1:
if started:
del urn[0]
for j in range(10):
started = True
urn.append(i+(j+1))
tmpI = i+(j+1)
i = tmpI
print("%s balls" % len(urn))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment