SlideShare a Scribd company logo
2
Most read
7
Most read
INTRODUCTION TO PYTHON
NUMBERS IN PYTHON
• Python supports integers, floating-point numbers and complex
numbers. They are defined as int,float and complex classes in
Python.
• Example:
o5 is an integer
o5.0 is a floating point
o5+4i is a complex number
• While integers can be of any length, a floating-point number is
accurate only up to 15 decimal places (the 16th place is
inaccurate).
10/10/2021
MS.DEEPALI SHINKAR 2
TYPE() AND ISINSTANCE()
• We can use the type() function to know which class a variable or
a value belongs to and isinstance() function to check if it
belongs to a particular class.
10/10/2021
MS.DEEPALI SHINKAR 3
DECIMAL : BINARY,OCTAL,HEXADECIMAL
• The numbers we deal with every day are of the decimal (base 10)
number system. But computer programmers (generally embedded
programmers) need to work with binary (base 2), hexadecimal (base
16) and octal (base 8) number systems.
• In Python, we can represent these numbers by appropriately placing
a prefix before that number.
10/10/2021
MS.DEEPALI SHINKAR 4
Number System Prefix
Binary ‘0b’ or ‘0B’
Octal ‘0o’ or ‘0O’
Hexadecimal ‘’0x’ or ‘0X’
DECIMAL
• decimal module is used when we want to carry out decimal
calculations.
• While floating-point numbers have precision up to 15 decimal
places, the decimal module has user-settable precision.
• We generally use Decimal in the following cases.
• When we are making financial applications that need exact
decimal representation.
• When we want to control the level of precision required.
• When we want to implement the notion of significant decimal
places. 10/10/2021
MS.DEEPALI SHINKAR 5
FRACTIONS
• Python provides operations involving fractional numbers
through its fractions module.
• A fraction has a numerator and a denominator, both of which
are integers. This module has support for rational number
arithmetic.
• Fractions allows us to instantiate with string as well. This is the
preferred option when using decimal numbers.
10/10/2021
MS.DEEPALI SHINKAR 6
PYTHON MATHEMATICS
• Python math module is defined as the most famous
mathematical functions, which includes trigonometric
functions, representation functions, logarithmic functions, etc.
• Furthermore, it also defines two mathematical constants, i.e.,
Pie and Euler number etc.
10/10/2021
MS.DEEPALI SHINKAR 7

More Related Content

PPTX
Basic concepts of python
PDF
Assignment5
PDF
Chaptr 1
PPTX
C data type format specifier
PDF
Computer experiments 1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branch
PDF
C programming | Class 8 | III Term
PDF
Semantic Analysis of a C Program
PDF
Session 5-exersice
Basic concepts of python
Assignment5
Chaptr 1
C data type format specifier
Computer experiments 1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branch
C programming | Class 8 | III Term
Semantic Analysis of a C Program
Session 5-exersice

What's hot (18)

PPT
8.Integer Overflows
PPT
Beginner C++ easy slide and simple definition with questions
PPT
Data types and Operators
PPT
C++ for beginners
PPT
Help with Pyhon Programming Homework
PPTX
Constants and variables in c programming
PDF
Lesson 02 python keywords and identifiers
PPT
C language Unit 2 Slides, UPTU C language
PDF
Fundamentals of Computing and C Programming - Part 1
PPT
Getting started with c++
PDF
Handout#09
DOCX
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
PPTX
Introduction to Python Part-1
PPTX
C++
 
PPTX
FUNDAMENTAL OF C
PDF
C programming part4
PPTX
Programming construction tools
PPT
Basics of c++
8.Integer Overflows
Beginner C++ easy slide and simple definition with questions
Data types and Operators
C++ for beginners
Help with Pyhon Programming Homework
Constants and variables in c programming
Lesson 02 python keywords and identifiers
C language Unit 2 Slides, UPTU C language
Fundamentals of Computing and C Programming - Part 1
Getting started with c++
Handout#09
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
Introduction to Python Part-1
C++
 
FUNDAMENTAL OF C
C programming part4
Programming construction tools
Basics of c++
Ad

Similar to Numbers and math module (20)

PDF
Class_X_PYTHON_J.pdf
PPT
17575602.ppt
PPTX
Wk3.pptx ICT INFORMATION COMMUNICATION TECHNOLOGY
PPT
python introduction all the students.ppt
PPTX
Lecture1_introduction to python.pptx
PDF
Introduction-to-Python-print-datatype.pdf
PPTX
conversion of number system ng meaurement
PDF
Using only above uploaded document(its formulas and concepts) solve problem 2...
PPTX
Python-Basics.pptx
PDF
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
PDF
Computer Related material named Phython ok
PPTX
ict7week3-240817091910-4b654e21 (1).pptx
PPTX
ICT 7 WEEK 3.pptx matatag curriculum educational technology
PPTX
Python PPT.pptx
PPT
python libsdafsdsfsdfsdsdfasdfsdsdaffds.ppt
PPTX
4_Introduction to Python Programming.pptx
PPTX
python notes for MASTER OF COMPUTER APPLIICATION_ppt.pptx
PPTX
Introduction to Python Basics for PSSE Integration
PPTX
Python presentation of Government Engineering College Aurangabad, Bihar
PPTX
Lecture Introduction to Python 2024.pptx
Class_X_PYTHON_J.pdf
17575602.ppt
Wk3.pptx ICT INFORMATION COMMUNICATION TECHNOLOGY
python introduction all the students.ppt
Lecture1_introduction to python.pptx
Introduction-to-Python-print-datatype.pdf
conversion of number system ng meaurement
Using only above uploaded document(its formulas and concepts) solve problem 2...
Python-Basics.pptx
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
Computer Related material named Phython ok
ict7week3-240817091910-4b654e21 (1).pptx
ICT 7 WEEK 3.pptx matatag curriculum educational technology
Python PPT.pptx
python libsdafsdsfsdfsdsdfasdfsdsdaffds.ppt
4_Introduction to Python Programming.pptx
python notes for MASTER OF COMPUTER APPLIICATION_ppt.pptx
Introduction to Python Basics for PSSE Integration
Python presentation of Government Engineering College Aurangabad, Bihar
Lecture Introduction to Python 2024.pptx
Ad

More from deepalishinkar1 (20)

PPTX
Data transformation with normalization and standardization
PPTX
Feature types and data preprocessing steps
PPTX
data structure stack appplication in python
PPTX
Stack application in infix to prefix expression
PPTX
Data Structure Stack operation in python
PPTX
steps for template in django for project
PDF
Web application on menu card qrcode generator.pdf
PPTX
Django model create a table in django web framework
PPTX
TO DO APP USING STREAMLIT PYTHON PROJECT
PPTX
basic concepts of object oriented in python
PDF
Inheritance and polymorphism oops concepts in python
PPTX
DATABASE CONNECTIVITY PYTHON USING MYSQL/SQLITE/POSTGRE
PPTX
File Operations in python Read ,Write,binary file etc.
PDF
How to create a django project procedure
PDF
Virtual environment in python on windows / linux os
PPTX
Operators in python
PPTX
Data handling in python
PDF
Practical approach on numbers system and math module
PDF
Demonstration on keyword
PPTX
Introduction to python
Data transformation with normalization and standardization
Feature types and data preprocessing steps
data structure stack appplication in python
Stack application in infix to prefix expression
Data Structure Stack operation in python
steps for template in django for project
Web application on menu card qrcode generator.pdf
Django model create a table in django web framework
TO DO APP USING STREAMLIT PYTHON PROJECT
basic concepts of object oriented in python
Inheritance and polymorphism oops concepts in python
DATABASE CONNECTIVITY PYTHON USING MYSQL/SQLITE/POSTGRE
File Operations in python Read ,Write,binary file etc.
How to create a django project procedure
Virtual environment in python on windows / linux os
Operators in python
Data handling in python
Practical approach on numbers system and math module
Demonstration on keyword
Introduction to python

Recently uploaded (20)

PPTX
The Stock at arrangement the stock and product.pptx
PPTX
A slide for students with the advantagea
PDF
Biography of Mohammad Anamul Haque Nayan
PDF
APNCET2025RESULT Result Result 2025 2025
PPTX
Definition and Relation of Food Science( Lecture1).pptx
PPTX
Overview Planner of Soft Skills in a single ppt
PPTX
Sports and Dance -lesson 3 powerpoint presentation
PPT
NO000387 (1).pptsbsnsnsnsnsnsnsmsnnsnsnsjsnnsnsnsnnsnnansnwjwnshshshs
PPTX
Your Guide to a Winning Interview Aug 2025.
PPTX
cse couse aefrfrqewrbqwrgbqgvq2w3vqbvq23rbgw3rnw345
PPT
notes_Lecture2 23l3j2 dfjl dfdlkj d 2.ppt
PPTX
STS CHAP 4 human development as reflected
PPTX
Theory of Change. AFH-FRDP OCEAN ToCpptx
PPT
BCH3201 (Enzymes and biocatalysis)-JEB (1).ppt
PPTX
_Dispute Resolution_July 2022.pptxmhhghhhh
PDF
MCQ Practice CBT OL Official Language 1.pptx.pdf
PDF
CV of Architect Professor A F M Mohiuddin Akhand.pdf
PDF
Parts of Speech Quiz Presentation in Orange Blue Illustrative Style.pdf.pdf
PDF
Sheri Ann Lowe Compliance Strategist Resume
PPTX
1751884730-Visual Basic -Unitj CS B.pptx
The Stock at arrangement the stock and product.pptx
A slide for students with the advantagea
Biography of Mohammad Anamul Haque Nayan
APNCET2025RESULT Result Result 2025 2025
Definition and Relation of Food Science( Lecture1).pptx
Overview Planner of Soft Skills in a single ppt
Sports and Dance -lesson 3 powerpoint presentation
NO000387 (1).pptsbsnsnsnsnsnsnsmsnnsnsnsjsnnsnsnsnnsnnansnwjwnshshshs
Your Guide to a Winning Interview Aug 2025.
cse couse aefrfrqewrbqwrgbqgvq2w3vqbvq23rbgw3rnw345
notes_Lecture2 23l3j2 dfjl dfdlkj d 2.ppt
STS CHAP 4 human development as reflected
Theory of Change. AFH-FRDP OCEAN ToCpptx
BCH3201 (Enzymes and biocatalysis)-JEB (1).ppt
_Dispute Resolution_July 2022.pptxmhhghhhh
MCQ Practice CBT OL Official Language 1.pptx.pdf
CV of Architect Professor A F M Mohiuddin Akhand.pdf
Parts of Speech Quiz Presentation in Orange Blue Illustrative Style.pdf.pdf
Sheri Ann Lowe Compliance Strategist Resume
1751884730-Visual Basic -Unitj CS B.pptx

Numbers and math module

  • 2. NUMBERS IN PYTHON • Python supports integers, floating-point numbers and complex numbers. They are defined as int,float and complex classes in Python. • Example: o5 is an integer o5.0 is a floating point o5+4i is a complex number • While integers can be of any length, a floating-point number is accurate only up to 15 decimal places (the 16th place is inaccurate). 10/10/2021 MS.DEEPALI SHINKAR 2
  • 3. TYPE() AND ISINSTANCE() • We can use the type() function to know which class a variable or a value belongs to and isinstance() function to check if it belongs to a particular class. 10/10/2021 MS.DEEPALI SHINKAR 3
  • 4. DECIMAL : BINARY,OCTAL,HEXADECIMAL • The numbers we deal with every day are of the decimal (base 10) number system. But computer programmers (generally embedded programmers) need to work with binary (base 2), hexadecimal (base 16) and octal (base 8) number systems. • In Python, we can represent these numbers by appropriately placing a prefix before that number. 10/10/2021 MS.DEEPALI SHINKAR 4 Number System Prefix Binary ‘0b’ or ‘0B’ Octal ‘0o’ or ‘0O’ Hexadecimal ‘’0x’ or ‘0X’
  • 5. DECIMAL • decimal module is used when we want to carry out decimal calculations. • While floating-point numbers have precision up to 15 decimal places, the decimal module has user-settable precision. • We generally use Decimal in the following cases. • When we are making financial applications that need exact decimal representation. • When we want to control the level of precision required. • When we want to implement the notion of significant decimal places. 10/10/2021 MS.DEEPALI SHINKAR 5
  • 6. FRACTIONS • Python provides operations involving fractional numbers through its fractions module. • A fraction has a numerator and a denominator, both of which are integers. This module has support for rational number arithmetic. • Fractions allows us to instantiate with string as well. This is the preferred option when using decimal numbers. 10/10/2021 MS.DEEPALI SHINKAR 6
  • 7. PYTHON MATHEMATICS • Python math module is defined as the most famous mathematical functions, which includes trigonometric functions, representation functions, logarithmic functions, etc. • Furthermore, it also defines two mathematical constants, i.e., Pie and Euler number etc. 10/10/2021 MS.DEEPALI SHINKAR 7