-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex28.py
More file actions
40 lines (21 loc) · 1.34 KB
/
ex28.py
File metadata and controls
40 lines (21 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#Running this will produce the answers for the 20 True/False questions given
print("True and True = ", True and True)
print("False and True = ", False and True)
print("1 == 1 and 2 == 1 = ", 1 == 1 and 2 == 1)
print('"test" == "test" = ', "test" == "test")
print('1 == 1 or 2 != 1 = ', 1 == 1 or 2 != 1)
print('True and 1 == 1 = ', True and 1 == 1)
print('False and 0 != 0 = ', False and 0 != 0)
print("True or 1 == 1 = ", True or 1 == 1)
print('"test" == "testing" = ', "test" == "testing")
print("1 != 0 and 2 == 1 = ", 1 != 0 and 2 == 1)
print('"test" != "testing" = ', "test" != "testing")
print('"test" == 1 = ', "test" == 1)
print("not (True and False) = ", not (True and False))
print("not (1 == 1 and 0 != 1) = ", not (1 == 1 and 0 != 1))
print("not (10 == 1 or 1000 == 1000) = ", not (10 == 1 or 1000 == 1000))
print("not (1 != 10 or 3 == 4) = ", not (1 != 10 or 3 == 4))
print('not ("testing" == "testing" and "Zed" == "Cool Guy") = ', not ("testing" == "testing" and "Zed" == "Cool Guy"))
print('1 == 1 and (not ("testing" == 1 or 1 == 0)) = ', 1 == 1 and (not ("testing" == 1 or 1 == 0)))
print('"chunky" == "bacon" and (not (3 == 4 or 3 == 3)) = ', "chunky" == "bacon" and (not (3 == 4 or 3 == 3)))
print('3 == 3 and (not ("testing" == "testing" or "Python" == "Fun")) = ', 3 == 3 and (not ("testing" == "testing" or "Python" == "Fun")))