Tag Archives: happy programming guide

function arguments in python

Introduction to function arguments in python: In python, Inputs given to the function are known as function arguments or parameters. Depending upon how we have defined the function, There are four basic types of arguments and in this article we are going to learn each the argument type in detail. If you don’t know the terms python function, argument, return statement etc. then I would request you to please go through the earlier article Python Functions. Python user defined function: To start with this article, Let’s

Read More

Functions in python

Introduction to python functions: In this article, We are going to learn what is python function? Different types of python functions. How to write and call python function in a program. So let’s get started with the definition of python function. What is python function? Function in python is a collection of related statements which are used to perform a specific task and return the result or value to the caller of the function. It basically breaks our code into smaller and modular chunks of code and

Read More

Python pass statement

Introduction to python pass statement: From last few articles we are learning about looping statements in python. Until now we have covered basic looping statements i.e for loop and while loop. Also we have covered topic break and continue statements in python using which we can decide whether to exit or continue the loop execution. Now let’s proceed further in this series and learn more about pass statement in python. Python pass statement is used as a placeholder in a program. Pass statement in python is a null statement i.e Nothing

Read More

Python break and continue statements

Introduction to python break and continue statements: In last few articles we have learned about looping in python and we have covered topics python for loop and python while loop. Basically these looping statements in python allows us to repeat the same task or code block efficiently. Using looping statements we can repeat the execution of code until the specified condition is satisfied. However sometimes we may come across some situations wherein: We want to terminate the loop execution and exit the loop without checking the

Read More

Python while loop

Introduction to python while loop: In computer programming, we may come across situations wherein we may require to execute same code repeatedly. Looping simply means execution of specific code again and again till the provided condition gets satisfied. There are many different ways of looping available in python. So in previous article we have covered python for loop and in this article we’ll be covering python while loop in detail. What is python while loop: Sometimes we can’t predict about when the test condition will be satisfied. Therefore

Read More

Sets in python

Introduction to sets in python: In this tutorial we are going to learn python Set data type. So let’s first start with the definition of python set data type. It is an unordered collection of unique (non duplicates) immutable elements or items. Here an individual data item of set is called as an element or an item of set. set_variable = {1,2,3} In above example numbers 1, 2, 3 are known as the elements or items of set. How to create a Set in python? There

Read More

Tuple data type in python

Introduction to Tuple Data Type in python: In this article we are going learn python Tuple data type in detail. Topics which we are going to cover are, What is tuple data type, How to create tuple? How to use it and what are the methods available with tuple date type. Also the basic difference between python list and tuple. Out of many available python data types, Tuple, String and List data type have one common characteristic. All of these three data types belongs to Sequence

Read More

List data type in python

Introduction to python List data type: List data type is the most widely used data type in python. So first of all let’s understand, What is meant by List in python? List is the data type format in python, Which is used to store data in list format i.e in an ordered sequence of elements. Members of list are called as list items or elements. This list is mutable(changeable) i.e You can edit the list over the course of time. So let’s begin to learn the

Read More

Different types of Operators in python

What are the different Operators available in python? First of all let’s try to understand, What is meant by Operators? So The Operators in python are the reserved symbols that represents an action. Each operator symbol in python has its own predefined action or operation to perform on the input entities. These input entities are called as operands. Let’s see one expression “3 + 5”. In this expression number 3 and 5 are the operands and symbol “+” is an operator. In python “+” symbol is supposed

Read More

Number data type and Type Conversion in python

What is Number data type and type conversion in python? To start with the python number data type and type conversion, Let’s first see Number data type. Python number data type is the data type which is used to store the numeric data. You can perform arithmetic operations on this data type. When you assign a new value to numeric data type a new object gets created. This is immutable data type, Hence as soon as you try to change its value, new object gets created.

Read More