int b=50 which is the variable statement
Answers
Answered by
5
Answer:
Order of Execution of print function is not from left to right , as often misunderstood. It depends upon the arguments , sub-expression and the compiler.
In this particular case , there are two logical operators in the argument of the print function. These are “AND” & “OR”. “AND” operation has higher precedence than “OR” operation, so it is evaluated first.
Hence, print function is evaluated in the following order:
print(a>45 or b>50 and c>10) #and operation is executed first
print(a>45 or (0)) #Since b is not greater than 50 and c is not greater than 0
print(1 or 0) # Since a is 50 and is greater than 45
print(1)
Answer : 1
Cheers :)
Similar questions