Predict the output of the following code:
x=3
if x>2 or x<5 and x==6:
print("ok”)
else:
print(“no output”)
Answers
Answered by
11
Answer:
"No output" will be the result .....
Welcome in advance.....
Reason
'or' will check for either of the conditions while 'and' checks for both the conditions to be true...
So in this case when 'and' will check x==6 it will become false and the else part will be executed
Please mark as brainliest....
Answered by
0
Answer:
no output will be the answer
Similar questions