✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
The boolean constants in Python are True
and False
, and the operators for combining boolean expressions are and
, or
, and not
. If <<expr1>>
and <<expr2>>
are two boolean expressions, then:
<<expr1>> and <<expr2>>
evaluates to true exactly when both <<expr1>>
and <<expr2>>
evaluate to true, and evaluates to false otherwise;<<expr1>> or <<expr2>>
evaluates to true when at least one of <<expr1>>
and <<expr2>>
evaluate to true, and evaluates to false otherwise; andnot <<expr1>>
evaluates to true exactly when <<expr1>>
evaluates to false, and vice-versa.What do you think the order of precedence is between and
, or
and not
? You can check the answers by extending your program in expressions.py
to print out the result of evaluating the following boolean expressions.
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!