Posts

Showing posts from March, 2017

Function in python

Image
Function in python Hello Friends, I am Nirav. And in this tutorial I going to show you Function in Python .. So, Let's get Started What is function ?            A function  is a block of organized, reusable code that is used to perform a single, related action. Function  provide better modularity for your application and a high degree of code reusing. As you already know,Pyhton  gives you many built-in function  like print(), etc. but you can also create your own function. What is user define function ?            It's provide to create your own function in python. Why we use function ?           Once a function is defined it can be used over and over again. you can invoke the same function many time in your program which save your work. How to create function ?           In python if you want to create a function first...

Dictionary and Tuples in Python

Image
Dictionary and Tuples in Python Hello Friends, I am Nirav. And in this tutorial I going to show you Dictionary and Tuples in Python .. So, Let's get Started Dictionary What is Dictionary ?            A dictionary  is an associative array (also known as hashes). Any key of the  dictionary  is associated (or mapped) to a value. The values of a  dictionary  can be any Python  data type. So  dictionary  are unordered key-value-pairs. Why we use Dictionary ?           To, give key value to any instruction or value.. How to create a Dictionary ?            Creating a dictionary is as simple as placing items inside curly braces {} separated by comma. An item has a key and the corresponding value expressed as a pair, key: value. While values can be of any data type and can repeat, keys must be of immutable type ( string ,  number ...

Loop Control Statement

Image
Loop Control Statement Hello Friends, I am Nirav. And in this tutorial I going to show you Loop Control Statement  in Python.. So, Let's get Started What is Loop ?           Loop is a sequence of instruction that is continually repeated until a certain condition is reached.           Ex:- For example one teacher punish boy that  write something until she don't tell him to stop.  That is one loop that boy can't stop until teacher can't tell him to stop Why we use loop statement ?           To execute one think many times. Ex:- if you want to print "hello" ten times than you have to use loop Types of loop  There are mainly 2 types of loop           1.) Entry Control            2.) Exit Control 1.) Entry Control            An entry control loop check the condition ...

User Input

Image
User Input Hello Friends, I am Nirav. And in this tutorial I going to show you User Input  in Python.. So, Let's get Started Why we wants user input ?           If you wants to develop some think for user that user can give his/her personal details and based on that your program will be work so that time we have to use user input. For EX:-      If you want to make a calculator than you have to get input from user side to enter numbers and after that enter arithmetic operation to perform. Arithmetic operations :- * , / , - , + , %           So, as you shown in upper it's store name in String datatype .  When you enter a value at that time if you don't put value in double invoted coma than it's treat that value as a integer and if you put that value in double invoted coma than it's treat as a String datatype.  Input more than one at a time        ...

Boolean Expression and If..else Condition

Image
Boolean Expression and If..else Condition Hello Friends, I am Nirav. And in this tutorial I going to show you Boolean Expression and If..else Condition in Python.. So, Let's get Started What is Boolean Expression ?          it's a expression that result in a Boolean value that is, in a value of wither true or false. If Condition Decision making is required when we want to execute a code only if a certain condition is satisfied. The if..elif..else  statement is used in Python for decision making. Here, the program evaluates the test expression  and will execute statement(s) only if the text expression is True . If the text expression is False , the statement(s) is not executed. In Python, the body of the if statement is indicated by the indentation. Body starts with an indentation and the first unindented line marks the end. Python interprets non-zero values as True. None and 0 are interpreted as...