Boolean expressions Flashcards
1
Q
True and True
A
True
2
Q
False and True
A
False
3
Q
1 == 1 and 2 == 1
A
False
4
Q
“test” == “test”
A
True
5
Q
1 == 1 or 2 != 1
A
True
6
Q
True and 1 == 1
A
True
7
Q
False and 0 != 0
A
False
8
Q
True or 1 == 1
A
True
9
Q
“test” == “testing”
A
False
10
Q
1 != 0 and 2 == 1
A
False
11
Q
“test” != “testing”
A
True
12
Q
“test” == 1
A
False
13
Q
not (True and False)
A
True
14
Q
not (1 == 1 and 0 != 1)
A
False
15
Q
not (10 == 1 or 1000 == 1000)
A
False
16
Q
not (1 != 10 or 3 == 4)
A
False
17
Q
not (“testing” == “testing” and “Zed” == “Cool Guy”)
A
True
18
Q
1 == 1 and not (“testing” == 1 or 1 == 0)
A
True
19
Q
“chunky” == “bacon” and not (3 == 4 or 3 == 3)
A
False
20
Q
3 == 3 and not (“testing” == “testing” or “Python” == “Fun”)
A
False