Last active
December 8, 2015 05:09
-
-
Save NickGeek/16e11ef8e1a54844fb57 to your computer and use it in GitHub Desktop.
I made a Python script for the ball counting problem in this video https://www.youtube.com/watch?v=ffUnNaQTfZE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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