In this video We are going to Discuss
1.Integer
2.Floating Points Numbers
3. Decimals
4.Complex Numbers
5.Strings
6.Boolean
Integers are Numbers Which are Positive , Negative and Including Zero Which Do not contain Any Sign. The Size of the integers in python is actually dependent Upon the Size of the Memory u have(RAM). it is almost infinity
And Integers Never contain a Decimal Point in its Numbers. For example 3.14 is not an integer.
here are two built-in Boolean objects: True and False. Like all other Python
data types (whether built-in, library, or custom), the bool data type can be
called as a function—with no arguments it returns False, with a bool argument
it returns a copy of the argument, and with any other argument it attempts
to convert the given object to a bool. All the built-in and standard library data
types can be converted to produce a Boolean value, and it is easy to provide
Boolean conversions for custom data types.
Python provides three kinds of floating-point values: the built-in float and
complex types, and the decimal.Decimal type from the standard library. All three
are immutable. Type float holds double-precision floating-point numbers
whose range depends on the C (or C# or Java) compiler Python was built with;
they have limited precision and cannot reliably be compared for equality.
Numbers of type float are written with a decimal point
The complex data type is an immutable type that holds a pair of floats, one
representing the real part and the other the imaginary part of a complex
number. Literal complex numbers are written with the real and imaginary
parts joined by a + or - sign, and with the imaginary part followed by a j.★ Here
are some examples: 3.5+2j, 0.5j, 4+0j, -1-3.7j. Notice that if the real part is 0,
we can omit it entirely.
In many applications the numerical inaccuracies that can occur when using
floats don’t matter, and in any case are far outweighed by the speed of calculation that floats offer. But in some cases we prefer the opposite trade-off, and
want complete accuracy, even at the cost of speed. The decimal module provides
immutable Decimal numbers that are as accurate as we specify. Calculations
involving Decimals are slower than those involving floats, but whether this is
noticeable will depend on the application.
Strings are represented by the immutable str data type which holds a sequence
of Unicode characters. The str data type can be called as a Character
encodings
➤ 91
function to create
string objects—with no arguments it returns an empty string, with a nonstring argument it returns the string form of the argument, and with a string
argument it returns a copy of the string. The str() function can also be used
as a conversion function, in which case the first argument should be a string
or something convertable to a string, with up to two optional string arguments
being passed, one specifying the encoding to use and the other specifying how
to handle encoding errors.