0% found this document useful (0 votes)
8 views26 pages

Python Operators

The document provides an overview of Python's bitwise operators, including AND, OR, XOR, NOT, and shift operators (left and right). It explains how these operators manipulate binary values, detailing their functions and syntax. Additionally, it briefly mentions Python's input and float functions for user interaction.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views26 pages

Python Operators

The document provides an overview of Python's bitwise operators, including AND, OR, XOR, NOT, and shift operators (left and right). It explains how these operators manipulate binary values, detailing their functions and syntax. Additionally, it briefly mentions Python's input and float functions for user interaction.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Python

Operators
Bitwise Operators
Bitwise AND Operator
Bitwise OR Operator
Bitwise XOR Operator
Bitwise NOT Operator
Bitwise Left Shift Operator
Bitwise Right Shift Operator
Bitwise (&)AND Operator
Bitwise (|) OR Operator
Bitwise (^) XOR Operator
Bitwise Operators (NOT ~)
Shift Operators
• There are two shift operators in programming:

1. Right shift operator

2. Left shift operator


Right Shift Operator
• Binary Right Shift Operator.

• The left operands value is moved right by the number of bits


specified by the right operand.
Right Shift Operator
Left Shift Operator
Left Shift Operator

• Left shift operator shifts all bits towards left by a certain


number of specified bits.

• The bit positions that have been vacated by the left shift
operator are filled with 0. The symbol of the left shift
operator is <<
Left Shift Operator
Bitwise Operators (left shift <<)
Print() Function
SEP = ‘’ parameter
END = ‘’ parameter
Python input() Function
input()
Two Integers from Users and Adding
What color is rose?: red
red
How many roses?: 10
10
Price of each rose?: 15.50
15.5
Python's float() function
Thank You

You might also like