This file contains 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
#!/usr/bin/env python | |
__author__ = 'Adam R. Smith ([email protected])' | |
# Loop from 0 through 99. Need zero-based for the later cyclic bit-shifting. | |
for x in xrange(100): | |
# There are 4 possible outputs on each iteration of the loop. | |
# 4 possibilities requires 2 bits to store (0, 1, 2, 3): | |
# 0 == 00b == the number (x + 1) | |
# 1 == 01b == 'Fizz' when a multiple of just 3 |