Posts

Showing posts with the label Python

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...

List Function in python

Image
List Function in Python Hello Friends, I am Nirav. And in this tutorial I going to show you how to use Variable and datatype in Python.. So, Let's get Started So, Friends as you know List function is basic function to remember all thing in one variable. Why we use List ?           To store data in to one variable name How To Create List ?            In Python programming, a list is created by placing all the items (elements) inside a square bracket [ ], separated by commas. It can have any number of items and they may be of different types (integer, float, string etc.). How to access elements from a list? There are various ways in which we can access the elements of a list.                      1 )  List Index                           In Index operator we can ...

Variables and datatype in Python

Image
Variables and datatype in Python Hello Friends, I am Nirav. And in this tutorial I going to show you how to use Variables and Datatype in python.. So, Let's get Started 1.Data types In python mainly three data types are used           1) Integer                              #Numerical values           2) String                               #Group of Characters           3) Float                                #Point Values           4) Boolean                           #Either true or false 2. Variables What is variable ? An element, feature, or factor that is liabl...

Print Function in python

Image
Print Function in python Hello Friends, I am Nirav. And in this tutorial I going to show you how to use print function in python…. So, Let’s get Started So, Friends as you all know print function is basic function in any programming language. Why we use print Function?                 So, main question is that “why we use print function?” when you wants to print something at a time of execution of your program than you have to use print function. For EX:- you want to print “This is my first program” so you have to write “This is my first program” in print function How to treat data type in print function                 In other programming language whatever you write in print function it’s trite that as a string and print whatever you write in print function.         ...