Last active
June 11, 2019 10:28
-
-
Save geryxyz/b228d6535f5271aea6684f733d1d4380 to your computer and use it in GitHub Desktop.
A simple algorithm to calculate an aesthetically pleasing order of bunny shaped door ornaments.
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
""" | |
A simple algorithm to calculate | |
an aesthetically pleasing order of | |
bunny shaped door ornaments. | |
""" | |
colors = ['green', 'pink', 'blue', 'yellow'] | |
for i in range(5): | |
for index, current in enumerate(colors): | |
print(current, end=' ') | |
if not index % 2: | |
print("top") | |
else: | |
print("reverse") | |
colors[0], colors[1] = colors[1], colors[0] | |
colors[2], colors[3] = colors[3], colors[2] |
Author
geryxyz
commented
Jun 11, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment