Christmas Snowflake Python
Author: Logiker
Category: Christmas Challenge
System: PC
Language: Python
Len source code: 148
Len exe file: 148
Len code only: 148
Instructions:
Run with Python interpreter.
Description:
This aproach is formular based and not data based. A database apraoch could be much smaller,
as I have used it for my C64 release.
The main work is done in the condition, that decides weather to draw a space or star:
a=abs(i);b=abs(j);s+=chr(32+10*(a*b<1 or(a==b or min(a,b)==5)and a|b<8 or(a%3-b)*(b%3-a)==0))
a*b<1 ... Horizontal and vertial line (one of both needs to be 0)
a==b or min(a,b)==5 ... Diagonal lines and orthogonal side lines
(a%3-b)*(b%3-a)==0 ... Diagonal side lines