In some cases, we would like to check for several conditions at the same time. Imagine we would like to print
Great weatherin case the temperature is between 20 and 27, as well as there are no clouds. That could be done with an
Python has 3 logical operators:
In python, they are evaluated with a priority of
and, and then
or. So, if the expression has several
ors, the program would evaluate
notoperations first, then
andoperations, and only then will evaluate
ors. It’s possible to force other priorities with parentheses.
Given 3 numbers, your task is to find out if any of those is even.
The input contains 3 integers. The program should print
Yesif any of the 3 numbers are even and
4 10 5
1 1 3