Variables and datatype in Python
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
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 liable to vary or change.
Why we use variables ?
Every variable has a name, called the variable name, and a data type. A variable's data type indicates
what sort of value the variable represents, such as whether it is an integer, a floating-point number, or a character. The opposite of a variable is a constant. Constants are values that never chage.
what sort of value the variable represents, such as whether it is an integer, a floating-point number, or a character. The opposite of a variable is a constant. Constants are values that never chage.
Declaration of Variables
name = "ABC" #String
number = 10 #integer
number2 = 5.5 #float
Type Conversation in data type
Why we use type conversion ?
When we wants to convert data form in one form to another form than we have to use this data conversation.
Below are some Examples.
Comments
Post a Comment