# 출력 결과 저장할 리스트
outBuffer = []

# 공백으로 초기화
for x in range(48):
    temList = []
    for y in range(48):
        temList.append(" ")
    outBuffer.append(temList)

def small_star(posX, posY):
    for x in range(5):
        for y in range(5):
            if x == 2 and y == 0:
                outBuffer[posX + x][posY + y] = "*"
            elif y == 2 and x % 2 == 1:
                outBuffer[posX + x][posY + y] = "*"
            elif y == 4:
                outBuffer[posX + x][posY + y] = "*"

def medium_star(posX, posY):
    small_star(posX + 3, posY)
    small_star(posX, posY + 6)
    small_star(posX + 6, posY + 6)
    
def large_star(posX, posY):
    medium_star(posX + 6, posY)
    medium_star(posX, posY + 12)
    medium_star(posX + 12, posY + 12)
    
def print_buffer(buffer):
    for x in range(len(buffer)):
        for y in range(len(buffer)):
            print(buffer[y][x], end = "")
        print("")

large_star(12, 0)
large_star(0, 24)
large_star(24, 24)
print_buffer(outBuffer)

+ Recent posts