Calling a Function in Python

In this tutorial, we will learn about calling a function in Python with the help of examples. So far, we have studied that a function ‘object’ is a block of code that performs a specific and well-defined task. It is…

In this tutorial, we will learn about calling a function in Python with the help of examples. So far, we have studied that a function ‘object’ is a block of code that performs a specific and well-defined task. It is…
In the previous tutorial, we have familiarized about functions in Python. We have studied that there are two types of functions in Python programming language. They are: Predefined functions (also called built-in functions) User-defined functions A predefined function is that…

A function in Python is a named block of organized and connected statements that performs a specific task. In other words, a function is a block of code that performs a specific and well-defined task. It organizes the code into…
Unlike other programming languages like C/C++/Java, Python does not have any dedicated switch case statement. A switch statement is a multiway decision statement that executes a statement by comparing the value of a variable to the values specified in the…

In this tutorial, we will learn about conditional statements or decision-making statements in Python with the help of general flowchart diagram. A simple program written in Python consists of a set of statements that contain expressions. An expression is a…

The pass statement in Python is a simple statement that tells the Python interpreter to ‘do nothing’. The interpreter simply continues with the execution of program whenever the pass statement is executed. This amazing feature makes it a good placeholder…

Continue in Python is a loop control statement similar to the break statement. It breaks the current execution (iteration) of loop and transfers the program control back to the beginning of the loop for the next execution without exiting the…

A break statement in Python is a loop control statement that ends the present loop statement and instructs Python to execute the next statement immediately following the loop. It provides a greater control over the execution of statements in a…

Sometimes, we might need to want a loop to repeat as long as the program is running. We can perform it with the help of an infinite loop. An infinite loop (also called endless loop) in Python is a sequence…