## Posts

Showing posts with the label Python - Operators

### Python Programming Language - Operators

Operators are special symbols used to manipulate values and variables.  For example: print( 9 + 5 ) Console output: 14 Here + is an operator that adds two numbers: 9 and 5. Types of operators in Python: Arithmetic operators Assignment Operators Comparison Operators Logical operators Bitwise operators Identity operators Membership operators 1. Arithmetic operators   Arithmetic operators are used to perform mathematical operations such as addition, subtraction, multiplication, etc. For example: print( 9 - 5 ) Console output: 4 Here - is the arithmetic operator that is used in the subtraction operation.  Let's look at an example of using arithmetic operators in Python: a = 9 b = 4   # Addition print ( 'Sum: ' , a + b)     # Subtraction print ( 'Subtraction: ' , a - b)     # Multiplication print ( 'Multiplication: ' , a * b)     # Division print ( 'Division: ' , a / b)   # Integer division print ( 'Floor Division: ' , a // b)   # Remainder of t