Last active
September 18, 2017 05:22
-
-
Save metatoaster/3d531177ecb8f803d633551b3fc824a8 to your computer and use it in GitHub Desktop.
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
| def fizzbuzz(): | |
| import random | |
| def magic(number=24866068): | |
| while True: | |
| random.seed(number) | |
| for x in range(15): | |
| n = int(random.random() * 10000) % 4 | |
| yield 'fizzbuzz'[(n*4-4)%8:n*4] | |
| for i, m in zip(range(1, 101), magic()): | |
| print(m or i) |
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
| import random | |
| print('\n'.join(m or str(i) for i, m in zip( | |
| range(1, 101), (i for sl in (('fizzbuzz'[(n*4-4)%8:n*4] for n in ( | |
| (int(random.random() * 10000) % 4) for _ in range(15))) | |
| for _ in range(7) if not random.seed(24866068)) for i in sl)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment