Pyramid pattern in Python

In the previous article we explored the printing of Inverted triangle patterns in Python, now we will look at the implementation of Pyramid pattern in Python. We accept the input value from the user and print a * pattern resembling a pyramid structure which is respective to the number entered by the user in it’s … Read more

Inverted Triangle pattern in Python

In the previous article we explored the implementation and approach towards Triangle pattern in Python, now we will explore the concept and implementation of the Inverted Triangle pattern in Python. It operates according to the user input, for example for the number 4 it would return: Implementation/Working of Inverted Triangle pattern in Python The pattern … Read more

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

Continue function in Python

In the previous article we explored the utility of the Break function, now we will explore the continue function in Python. Let us take a look at an illustrative problem and example: We are given a list of numbers, and we need to print out only those values from the list which are not the … Read more

Break function in Python

In the previous article we have gone through the various approaches of writing a program to print multiplication tables, now let us explore the break function in Python. Before we explore the concept and usage let us look at a problem. We are required to get the smallest divisor of a number such that the … Read more

Multiplication Table of a Number in Python

In the previous article we explore the For Loop structure, now let us take a look at an example case of printing Multiplication Table of a Number in Python. If a user provides the number 3, we return 3, 6, 9, 12, 15, 18, 21, 27 and 30. If the number specified was 5 instead … Read more

For Loop in Python

In the previous article we explore the use of the range( ) function in Python, in this article we will explore another important kind of loop, that is the For Loop. A  for loop in the Python programming language is designed to iterate over the elements of data structures and some other objects. It is not … Read more

range( ) function in Python

In the previous article we explored while loops, now we will look at the purpose of the range ( ) function. The range ( ) function is used to generate a specified range of numbers. There are three forms of range functions, and we will explore each one. Suppose we specify a range(5), the number … Read more