
Python 04: Boolean expressions
Quiz by Jonathan Saurine
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
Which of the following variables contains a Boolean value?
Which of the following statements is NOT Boolean?
What is the truth of the Boolean expression below?
<pre><code>x = 10<br>y = 5<br>x > y and y != 3</code></pre>
What is the truth of the Boolean expression below?
<pre><code>3 ** 2 + 1 != 30 / 3</code></pre>
What is the truth of the Boolean expression below?
<pre><code>(9 - 4) * 2 == (77 / 7) - 1</code></pre>
What is the truth of the Boolean expression below?
<pre><code>4 * 5 <= 21 - 1</code></pre>
What is the truth of the Boolean expression below?
<pre><code>x = 8<br>y = 4<br>x > 10 or y < 5</code></pre>
What is the truth of the Boolean expression below?
<pre><code>len("apple") == 5 and 7 > 3</code></pre>
What is the truth of the Boolean expression below?
<pre><code>100 / 2 == 50 and (8 + 4) > 10</code></pre>
What is the truth of the Boolean expression below?
<pre><code>100 / 2 == 50 and (8 + 4) > 10</code></pre>
Is the following sentence a valid Boolean expression?
<pre><code>age >= 18 or hasParentConsent</code></pre>
What is the truth of the Boolean expression below?
<pre><code>"hello" != "world" or 5 <= 2</code></pre>
What is the truth of the Boolean expression below?
<pre><code>x = 2**4<br>y = 2<br>x * y >= 20 and x + y < 10</code></pre>
Which of these statements is Boolean?
Which of these statements is non-Boolean?