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
"""Several Python FizzBuzz implementations ranging from very naive to very golf-like""" | |
# Naive `for` loop (+150 bytes) | |
for i in range(1, 101): | |
if not i % 15: | |
print('FizzBuzz') | |
elif not i % 3: | |
print('Fizz') | |
elif not i % 5: | |
print('Buzz') |
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
""" | |
Fancy Chebyshev Spiral plotter. | |
The original idea comes from [Wolfram MathWorld] | |
(https://mathworld.wolfram.com/ChebyshevPolynomialoftheFirstKind.html) | |
This is my Python implementation of the original | |
plot by Trott 1999, pp. 10 and 84. | |
""" | |
import numpy as np |