In this class we do practice examples on operators in python
0:00 Practice examples
Take a look at the coding questions. pause the video try to analyze first. after than listen to the explanation.
from the first code.
logical and operator has highest precedence and the associativity for logical and is left to right.
so first y and z will execute which result in true. later true and k result in false.
finally x or false result in false
from the second example right shift has highest precedence when compared to bitwise and operator
after right shifting value 2 we get value 1.
now bitwise and operator with 1 and 5 result in 1
visit our learning agent at www.wisdomers.in for quizzes and projects