SlideShare a Scribd company logo
1 of 15
PYTHON
CLASS: XI
COMPUTER SCIENCE(083)
OPERATORS IN PYTHON
PART-1
OPERATORS:
The operator can be defined as a symbol which is responsible for a particular
operation between two operands. Operators are used to perform operations
on variables and values.
The operator can be defined as a symbol which is responsible for a particular
operation between two operands. Operators are used to perform operations
on variables and values.
Arithmetic operators
Comparison operators
Assignment Operators
Logical Operators
Membership Operators
Identity Operators
Types of Operators
Arithmetic Operators
Arithmetic operators are used with numeric values to perform common
mathematical operations:
Operator Name Example
+ Addition x + y
- Subtraction x - y
* Multiplication x * y
/ Division x / y
// Floor division[Integer Division] x // y
** Exponentiation x ** y
% Modulus x % y
Arithmetic Operators
+ Addition x + y
Example 1:
A=10
B=20
C=A+B
print(“A+B=“,C)
--Output---
A+B=30
Example 2:
A=10
B=20
--Output---
A+B=30
print(“A+B=“,A+B)
Example 3:
A=int(input(“Enter value A:”))
print(“A+B=“,C)
B=int(input(“Enter value B:”))
C=A+B
--Output---
Enter value A: 5
Enter value B: 4
A+B=9
Arithmetic Operators
Example 1:
A=20
B=10
C=A-B
print(“A-B=“,C)
--Output---
A-B=10
Example 2:
A=30
B=20
--Output---
A-B=10
print(“A-B=“,A-B)
Example 3:
A=int(input(“Enter value A:”))
print(“A-B=“,C)
B=int(input(“Enter value B:”))
C=A-B
--Output---
Enter value A: 5
Enter value B: 4
A-B=1
- Subtraction x - y
Arithmetic Operators
Example 1:
A=2
B=10
C=A*B
print(“A*B=“,C)
--Output---
A*B=20
Example 2:
A=3
B=2
--Output---
A*B=6
print(“A*B=“,A*B)
Example 3:
A=int(input(“Enter value A:”))
print(“A*B=“,C)
B=int(input(“Enter value B:”))
C=A*B
--Output---
Enter value A: 5
Enter value B: 4
A*B=20
* Multiplication x * y
Arithmetic Operators
Example 1:
A=27
B=5
C=A/B
print(“A/B=“,C)
--Output---
A/B=5.4
Example 2:
A=27
B=5
--Output---
A//B=5
/ [Division] x / y // Floor division[Integer Division] x // y
C=A//B
print(“A//B=“,C)
Arithmetic Operators
Example 1:
A=27
B=5
C=A%B
print(“A%B=“,C)
--Output---
A%B=2
Example 2:
A=int(input(“Enter the value of A:”))
--Output---
Enter the value of A: 4
Enter the value of B: 2
A%B=0
% [Modulus] x % y : It return remainder value
C=A%B
print(“A%B=“,C)
B=int(input(“Enter the value of B:”))
Arithmetic Operators
Example 1:
A=2
B=3
C=A**B
print(“A**B=“,C)
--Output---
A**B=8
Example 2:
A=int(input(Enter the value of A”))
B=int(input(“Enter the power”))
--Output---
Enter the value of A: 7
Enter the power: 2
A**B=49
C=A**B
print(“A**B=“,C)
** Exponentiation x ** y
Meaning of A**B
AB
Precedence of Arithmetic Operators
Highest
Lowest
() parentheses
** (Exponentiation)
/(division) // (integer division) * ( multiply)
% (modulas)
+ (addition) - ( subtraction)
Expressions:
An expression is a combination of variable and operators. It generates a
single value, which by itself is an expression.
Example:
5 + 2 * 4 and the result is 13
Q. Convert the Mathematical Expressions to equivalent python expressions
Algebraic Expression Python Programming Expression
5A 5 * A
4ab 4 * a * b
A2 + B2 A**2 + B **2
a=(x+y)/(x-y)
20 + 30 * 40
Evaluate the expressions:
1
2
20 + 120
140
20 - 30 + 40
1
2
-10 + 40
30
The two operators (–) and (+)
have equal precedence. Thus,
the first operator, i.e.,
subtraction is applied before
the second operator, i.e.,
addition (left to right).
Evaluate the expressions:
12 + 3 * 4 – 6/2
1
3
4
12 + 12 – 6/2
12 + 12 – 3.0
2
24– 3.0
21.0
(12 + 3) * 4 – 6//2
1
2
4
3 15 * 4 – 6//2
60 – 6//2
60 – 3
57
+ ( plus) and (*) sign for string
+ ( plus) : It is use to concatenation of string and in string case + (plus)
sign is known as concatenation operator.
Example:
If there are two variable A=‘WELCOME’ and B=‘PYTHON’ and we want
to join these two strings.
A=‘WELCOME’
B=‘PYTHON’
print(A+B)
---Output----
WELCOMEPYTHON
It display join or concatenation of
two string but without any gap
+ ( plus) and (*) sign for string
* (multiply) : It is use to repeat the string as many times we need by
multiplying the string with number given.
Example:
If variable A=‘WELCOME’ and we want to display WELCOME 3 times
A=‘WELCOME’
print(A*3)
---Output----
WELCOMEWELCOMEWELCOME

More Related Content

What's hot

Programming Fundamentals Arrays and Strings
Programming Fundamentals   Arrays and Strings Programming Fundamentals   Arrays and Strings
Programming Fundamentals Arrays and Strings imtiazalijoono
 
USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2vikram mahendra
 
Maharishi University of Management (MSc Computer Science test questions)
Maharishi University of Management (MSc Computer Science test questions)Maharishi University of Management (MSc Computer Science test questions)
Maharishi University of Management (MSc Computer Science test questions)Dharma Kshetri
 
Input processing and output in Python
Input processing and output in PythonInput processing and output in Python
Input processing and output in PythonRaajendra M
 
C interview question answer 2
C interview question answer 2C interview question answer 2
C interview question answer 2Amit Kapoor
 
Python programming workshop
Python programming workshopPython programming workshop
Python programming workshopBAINIDA
 
Simple IO Monad in 'Functional Programming in Scala'
Simple IO Monad in 'Functional Programming in Scala'Simple IO Monad in 'Functional Programming in Scala'
Simple IO Monad in 'Functional Programming in Scala'Philip Schwarz
 
Functions and pointers_unit_4
Functions and pointers_unit_4Functions and pointers_unit_4
Functions and pointers_unit_4Saranya saran
 
C aptitude scribd
C aptitude scribdC aptitude scribd
C aptitude scribdAmit Kapoor
 
18 dec pointers and scope resolution operator
18 dec pointers and scope resolution operator18 dec pointers and scope resolution operator
18 dec pointers and scope resolution operatorSAFFI Ud Din Ahmad
 
operators and expressions in c++
 operators and expressions in c++ operators and expressions in c++
operators and expressions in c++sanya6900
 

What's hot (20)

Programming Fundamentals Arrays and Strings
Programming Fundamentals   Arrays and Strings Programming Fundamentals   Arrays and Strings
Programming Fundamentals Arrays and Strings
 
Arrays
ArraysArrays
Arrays
 
USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2
 
Maharishi University of Management (MSc Computer Science test questions)
Maharishi University of Management (MSc Computer Science test questions)Maharishi University of Management (MSc Computer Science test questions)
Maharishi University of Management (MSc Computer Science test questions)
 
Python : Operators
Python : OperatorsPython : Operators
Python : Operators
 
Input processing and output in Python
Input processing and output in PythonInput processing and output in Python
Input processing and output in Python
 
Arrays
ArraysArrays
Arrays
 
C interview question answer 2
C interview question answer 2C interview question answer 2
C interview question answer 2
 
Python programming workshop
Python programming workshopPython programming workshop
Python programming workshop
 
Chap 5 c++
Chap 5 c++Chap 5 c++
Chap 5 c++
 
Chap 5 c++
Chap 5 c++Chap 5 c++
Chap 5 c++
 
Simple IO Monad in 'Functional Programming in Scala'
Simple IO Monad in 'Functional Programming in Scala'Simple IO Monad in 'Functional Programming in Scala'
Simple IO Monad in 'Functional Programming in Scala'
 
Functions and pointers_unit_4
Functions and pointers_unit_4Functions and pointers_unit_4
Functions and pointers_unit_4
 
CSE240 Pointers
CSE240 PointersCSE240 Pointers
CSE240 Pointers
 
C aptitude scribd
C aptitude scribdC aptitude scribd
C aptitude scribd
 
18 dec pointers and scope resolution operator
18 dec pointers and scope resolution operator18 dec pointers and scope resolution operator
18 dec pointers and scope resolution operator
 
operators and expressions in c++
 operators and expressions in c++ operators and expressions in c++
operators and expressions in c++
 
Operators in python
Operators in pythonOperators in python
Operators in python
 
Chap 6 c++
Chap 6 c++Chap 6 c++
Chap 6 c++
 
Chap 6 c++
Chap 6 c++Chap 6 c++
Chap 6 c++
 

Similar to OPERATOR IN PYTHON-PART1

Cse lecture-4.1-c operators and expression
Cse lecture-4.1-c operators and expressionCse lecture-4.1-c operators and expression
Cse lecture-4.1-c operators and expressionFarshidKhan
 
Operator & Expression in c++
Operator & Expression in c++Operator & Expression in c++
Operator & Expression in c++bajiajugal
 
Class_IX_Operators.pptx
Class_IX_Operators.pptxClass_IX_Operators.pptx
Class_IX_Operators.pptxrinkugupta37
 
This slide contains information about Operators in C.pptx
This slide contains information about Operators in C.pptxThis slide contains information about Operators in C.pptx
This slide contains information about Operators in C.pptxranaashutosh531pvt
 
Operators and expressions in c language
Operators and expressions in c languageOperators and expressions in c language
Operators and expressions in c languagetanmaymodi4
 
Operators inc c language
Operators inc c languageOperators inc c language
Operators inc c languageTanmay Modi
 
Operators and Expressions in C++
Operators and Expressions in C++Operators and Expressions in C++
Operators and Expressions in C++Praveen M Jigajinni
 
Dti2143 chapter 3 arithmatic relation-logicalexpression
Dti2143 chapter 3 arithmatic relation-logicalexpressionDti2143 chapter 3 arithmatic relation-logicalexpression
Dti2143 chapter 3 arithmatic relation-logicalexpressionalish sha
 
C programming session 02
C programming session 02C programming session 02
C programming session 02Dushmanta Nath
 
Operators in Python
Operators in PythonOperators in Python
Operators in PythonAnusuya123
 
Chapter 3.3
Chapter 3.3Chapter 3.3
Chapter 3.3sotlsoc
 
Arithmetic and increment decrement Operator
Arithmetic and increment decrement OperatorArithmetic and increment decrement Operator
Arithmetic and increment decrement OperatorMegha Sharma
 
C++ revision add on till now
C++ revision add on till nowC++ revision add on till now
C++ revision add on till nowAmAn Singh
 
C++ revision add on till now
C++ revision add on till nowC++ revision add on till now
C++ revision add on till nowAmAn Singh
 

Similar to OPERATOR IN PYTHON-PART1 (20)

Coper in C
Coper in CCoper in C
Coper in C
 
Cse lecture-4.1-c operators and expression
Cse lecture-4.1-c operators and expressionCse lecture-4.1-c operators and expression
Cse lecture-4.1-c operators and expression
 
Operator & Expression in c++
Operator & Expression in c++Operator & Expression in c++
Operator & Expression in c++
 
C – operators and expressions
C – operators and expressionsC – operators and expressions
C – operators and expressions
 
Class_IX_Operators.pptx
Class_IX_Operators.pptxClass_IX_Operators.pptx
Class_IX_Operators.pptx
 
This slide contains information about Operators in C.pptx
This slide contains information about Operators in C.pptxThis slide contains information about Operators in C.pptx
This slide contains information about Operators in C.pptx
 
Operators and expressions in c language
Operators and expressions in c languageOperators and expressions in c language
Operators and expressions in c language
 
Operators inc c language
Operators inc c languageOperators inc c language
Operators inc c language
 
Operators and Expressions in C++
Operators and Expressions in C++Operators and Expressions in C++
Operators and Expressions in C++
 
Dti2143 chapter 3 arithmatic relation-logicalexpression
Dti2143 chapter 3 arithmatic relation-logicalexpressionDti2143 chapter 3 arithmatic relation-logicalexpression
Dti2143 chapter 3 arithmatic relation-logicalexpression
 
C programming session 02
C programming session 02C programming session 02
C programming session 02
 
Operators in Python
Operators in PythonOperators in Python
Operators in Python
 
Chapter 3.3
Chapter 3.3Chapter 3.3
Chapter 3.3
 
Arithmetic and increment decrement Operator
Arithmetic and increment decrement OperatorArithmetic and increment decrement Operator
Arithmetic and increment decrement Operator
 
Arithmetic operator
Arithmetic operatorArithmetic operator
Arithmetic operator
 
Arithmetic operator
Arithmetic operatorArithmetic operator
Arithmetic operator
 
05 operators
05   operators05   operators
05 operators
 
C++ revision add on till now
C++ revision add on till nowC++ revision add on till now
C++ revision add on till now
 
C++ revision add on till now
C++ revision add on till nowC++ revision add on till now
C++ revision add on till now
 
Opeartor & expression
Opeartor & expressionOpeartor & expression
Opeartor & expression
 

More from vikram mahendra

Python Project On Cosmetic Shop system
Python Project On Cosmetic Shop systemPython Project On Cosmetic Shop system
Python Project On Cosmetic Shop systemvikram mahendra
 
Python Project on Computer Shop
Python Project on Computer ShopPython Project on Computer Shop
Python Project on Computer Shopvikram mahendra
 
PYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEMPYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEMvikram mahendra
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Pythonvikram mahendra
 
FLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHONFLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHONvikram mahendra
 
FLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHONFLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHONvikram mahendra
 
LIST IN PYTHON[SELECTION SORT]
LIST IN PYTHON[SELECTION SORT]LIST IN PYTHON[SELECTION SORT]
LIST IN PYTHON[SELECTION SORT]vikram mahendra
 
DATA REPRESENTATION-NUMBER SYSTEM-PART-5
DATA REPRESENTATION-NUMBER SYSTEM-PART-5DATA REPRESENTATION-NUMBER SYSTEM-PART-5
DATA REPRESENTATION-NUMBER SYSTEM-PART-5vikram mahendra
 
DATA REPRESENTATION-NUMBER SYSTEM
DATA REPRESENTATION-NUMBER SYSTEMDATA REPRESENTATION-NUMBER SYSTEM
DATA REPRESENTATION-NUMBER SYSTEMvikram mahendra
 
LIST IN PYTHON[BUBBLE SORT]
LIST IN PYTHON[BUBBLE SORT]LIST IN PYTHON[BUBBLE SORT]
LIST IN PYTHON[BUBBLE SORT]vikram mahendra
 
Internet,its applications and services
Internet,its applications and servicesInternet,its applications and services
Internet,its applications and servicesvikram mahendra
 
DATA REPRESENTATION [NUMBER SYSTEM]
DATA REPRESENTATION [NUMBER SYSTEM]DATA REPRESENTATION [NUMBER SYSTEM]
DATA REPRESENTATION [NUMBER SYSTEM]vikram mahendra
 

More from vikram mahendra (20)

Communication skill
Communication skillCommunication skill
Communication skill
 
Python Project On Cosmetic Shop system
Python Project On Cosmetic Shop systemPython Project On Cosmetic Shop system
Python Project On Cosmetic Shop system
 
Python Project on Computer Shop
Python Project on Computer ShopPython Project on Computer Shop
Python Project on Computer Shop
 
PYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEMPYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEM
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Python
 
FLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHONFLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHON
 
FLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHONFLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHON
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
GREEN SKILL[PART-2]
GREEN SKILL[PART-2]GREEN SKILL[PART-2]
GREEN SKILL[PART-2]
 
GREEN SKILLS[PART-1]
GREEN SKILLS[PART-1]GREEN SKILLS[PART-1]
GREEN SKILLS[PART-1]
 
Dictionary in python
Dictionary in pythonDictionary in python
Dictionary in python
 
Entrepreneurial skills
Entrepreneurial skillsEntrepreneurial skills
Entrepreneurial skills
 
Boolean logic
Boolean logicBoolean logic
Boolean logic
 
Tuple in python
Tuple in pythonTuple in python
Tuple in python
 
LIST IN PYTHON[SELECTION SORT]
LIST IN PYTHON[SELECTION SORT]LIST IN PYTHON[SELECTION SORT]
LIST IN PYTHON[SELECTION SORT]
 
DATA REPRESENTATION-NUMBER SYSTEM-PART-5
DATA REPRESENTATION-NUMBER SYSTEM-PART-5DATA REPRESENTATION-NUMBER SYSTEM-PART-5
DATA REPRESENTATION-NUMBER SYSTEM-PART-5
 
DATA REPRESENTATION-NUMBER SYSTEM
DATA REPRESENTATION-NUMBER SYSTEMDATA REPRESENTATION-NUMBER SYSTEM
DATA REPRESENTATION-NUMBER SYSTEM
 
LIST IN PYTHON[BUBBLE SORT]
LIST IN PYTHON[BUBBLE SORT]LIST IN PYTHON[BUBBLE SORT]
LIST IN PYTHON[BUBBLE SORT]
 
Internet,its applications and services
Internet,its applications and servicesInternet,its applications and services
Internet,its applications and services
 
DATA REPRESENTATION [NUMBER SYSTEM]
DATA REPRESENTATION [NUMBER SYSTEM]DATA REPRESENTATION [NUMBER SYSTEM]
DATA REPRESENTATION [NUMBER SYSTEM]
 

Recently uploaded

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 

Recently uploaded (20)

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 

OPERATOR IN PYTHON-PART1

  • 2. OPERATORS: The operator can be defined as a symbol which is responsible for a particular operation between two operands. Operators are used to perform operations on variables and values. The operator can be defined as a symbol which is responsible for a particular operation between two operands. Operators are used to perform operations on variables and values. Arithmetic operators Comparison operators Assignment Operators Logical Operators Membership Operators Identity Operators Types of Operators
  • 3. Arithmetic Operators Arithmetic operators are used with numeric values to perform common mathematical operations: Operator Name Example + Addition x + y - Subtraction x - y * Multiplication x * y / Division x / y // Floor division[Integer Division] x // y ** Exponentiation x ** y % Modulus x % y
  • 4. Arithmetic Operators + Addition x + y Example 1: A=10 B=20 C=A+B print(“A+B=“,C) --Output--- A+B=30 Example 2: A=10 B=20 --Output--- A+B=30 print(“A+B=“,A+B) Example 3: A=int(input(“Enter value A:”)) print(“A+B=“,C) B=int(input(“Enter value B:”)) C=A+B --Output--- Enter value A: 5 Enter value B: 4 A+B=9
  • 5. Arithmetic Operators Example 1: A=20 B=10 C=A-B print(“A-B=“,C) --Output--- A-B=10 Example 2: A=30 B=20 --Output--- A-B=10 print(“A-B=“,A-B) Example 3: A=int(input(“Enter value A:”)) print(“A-B=“,C) B=int(input(“Enter value B:”)) C=A-B --Output--- Enter value A: 5 Enter value B: 4 A-B=1 - Subtraction x - y
  • 6. Arithmetic Operators Example 1: A=2 B=10 C=A*B print(“A*B=“,C) --Output--- A*B=20 Example 2: A=3 B=2 --Output--- A*B=6 print(“A*B=“,A*B) Example 3: A=int(input(“Enter value A:”)) print(“A*B=“,C) B=int(input(“Enter value B:”)) C=A*B --Output--- Enter value A: 5 Enter value B: 4 A*B=20 * Multiplication x * y
  • 7. Arithmetic Operators Example 1: A=27 B=5 C=A/B print(“A/B=“,C) --Output--- A/B=5.4 Example 2: A=27 B=5 --Output--- A//B=5 / [Division] x / y // Floor division[Integer Division] x // y C=A//B print(“A//B=“,C)
  • 8. Arithmetic Operators Example 1: A=27 B=5 C=A%B print(“A%B=“,C) --Output--- A%B=2 Example 2: A=int(input(“Enter the value of A:”)) --Output--- Enter the value of A: 4 Enter the value of B: 2 A%B=0 % [Modulus] x % y : It return remainder value C=A%B print(“A%B=“,C) B=int(input(“Enter the value of B:”))
  • 9. Arithmetic Operators Example 1: A=2 B=3 C=A**B print(“A**B=“,C) --Output--- A**B=8 Example 2: A=int(input(Enter the value of A”)) B=int(input(“Enter the power”)) --Output--- Enter the value of A: 7 Enter the power: 2 A**B=49 C=A**B print(“A**B=“,C) ** Exponentiation x ** y Meaning of A**B AB
  • 10. Precedence of Arithmetic Operators Highest Lowest () parentheses ** (Exponentiation) /(division) // (integer division) * ( multiply) % (modulas) + (addition) - ( subtraction)
  • 11. Expressions: An expression is a combination of variable and operators. It generates a single value, which by itself is an expression. Example: 5 + 2 * 4 and the result is 13 Q. Convert the Mathematical Expressions to equivalent python expressions Algebraic Expression Python Programming Expression 5A 5 * A 4ab 4 * a * b A2 + B2 A**2 + B **2 a=(x+y)/(x-y)
  • 12. 20 + 30 * 40 Evaluate the expressions: 1 2 20 + 120 140 20 - 30 + 40 1 2 -10 + 40 30 The two operators (–) and (+) have equal precedence. Thus, the first operator, i.e., subtraction is applied before the second operator, i.e., addition (left to right).
  • 13. Evaluate the expressions: 12 + 3 * 4 – 6/2 1 3 4 12 + 12 – 6/2 12 + 12 – 3.0 2 24– 3.0 21.0 (12 + 3) * 4 – 6//2 1 2 4 3 15 * 4 – 6//2 60 – 6//2 60 – 3 57
  • 14. + ( plus) and (*) sign for string + ( plus) : It is use to concatenation of string and in string case + (plus) sign is known as concatenation operator. Example: If there are two variable A=‘WELCOME’ and B=‘PYTHON’ and we want to join these two strings. A=‘WELCOME’ B=‘PYTHON’ print(A+B) ---Output---- WELCOMEPYTHON It display join or concatenation of two string but without any gap
  • 15. + ( plus) and (*) sign for string * (multiply) : It is use to repeat the string as many times we need by multiplying the string with number given. Example: If variable A=‘WELCOME’ and we want to display WELCOME 3 times A=‘WELCOME’ print(A*3) ---Output---- WELCOMEWELCOMEWELCOME