Printing of Triangle Patterns in Python

In the previous article we explored the printing of square patterns in Python, now let us look at another common printing pattern, the printing of triangle patterns in Python. The program prints the triangle according to the respective values given by the user, suppose the user enters the value of 4 the resultant output is: … Read more

Square Patterns in Python

In the previous article we explored Nested Loops, now starting from this article we will look at a series of pattern related programs. First we will start with the square type pattern. Suppose the user enters a number n, the program should return a star pattern with the size n*n. Example for the input of … Read more