---
# System prepended metadata

title: Untitled

---

Flair labs assignment

    import math 

    def printPattern(n):

        k = 0
        mid = math.ceil(n/2)
        for i in range(1, n+1):
            if i <= mid:
                k = k+1
            else:
                k = k-1
            for j in range(1, n+1):
                if (j<= (mid+1)-k or j >= (mid-1)+k): 
                    print("*", end = "")
                else:
                    print(" ", end = "")
            print("\n")

    if __name__ == '__main__':
        n = 5
        printPattern(n);