Data Types in Python - PowerPoint PPT Presentation

About This Presentation
Title:

Data Types in Python

Description:

This presentation guide you through the data types in python, numeric data types and its components integer, float and complex. – PowerPoint PPT presentation

Number of Views:319

less

Transcript and Presenter's Notes

Title: Data Types in Python


1
Data Types in Python
Swipe
2
Data Types in Python
Operator
Operator
Integers Float Complex Boolean String None
List Tuple Range Bytes Bytes Arrays Set Frozen
Set Dictionary
Numbers
Sequence
Sequence
Mapping
3
Data Types in Python
  • The classification or categorising of data
    elements is known as data types. It denotes the
    kind of value that specifies which
  • operations can be performed on a given set of
    data. Data types are essentially classes, and
  • variables are instances (objects) of these
    classes, because everything in Python
    programming is an object.

4
Number
The standard Python method is used to create
Python numbers variables. Using the regular
Python number type is usually sufficient. If
necessary, Python will automatically convert a
number from one type to another. But, under
certain circumstances that a specific number
type is needed (ie. complex) Numbers in python-
Integers Float Complex
5
Integers in Python
This value is represented by int class. It
contains positive or negative whole numbers
(without fraction or decimal). In Python there
is no limit to how long an integer value can be.
Whole number without decimal point, including.
Integers can be represent in different forms.
Integers
No concept of size for any data type in python
6
Floats in Python
This value is represented by float class. It is a
real number with floating point representation.
It is specified by a decimal point. Optionally,
the character e or E followed by a positive or
negative integer may be appended to specify
scientific notation.
Real number with decimal point
Floats
Exponential from
No concept of double
7
Complex numbers in Python
Complex number is represented by complex class. It
is specified as (real part) (imaginary
part)j. abj where a is real b is imaginary. j
is the square root of -. a.real b.imag
Integers
a can be decimal/binary
b can be decimal only
Except modulo operation
rest all operations are applicable.
8
Topics for next Post
Data Types in Python Mutable vs Immutable Data
type in Python Stay Tuned with
Write a Comment
User Comments (0)
About PowerShow.com