Skip to content

Commit d4609ef

Browse files
committed
logic operators implemented
1 parent 9f4c51d commit d4609ef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

028_logic.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ def a_or_b(a, b):
5959
print("Function: a_and_b")
6060

6161
def a_and_b(a, b):
62-
# return a ?? b
63-
pass
62+
return a and b
63+
6464

6565
check_that_these_are_equal(a_and_b(True, True), True)
6666
check_that_these_are_equal(a_and_b(True, False), False)
@@ -75,8 +75,8 @@ def a_and_b(a, b):
7575
# Note that this operator only takes one value. The operator
7676
# goes first, and the value second.
7777
def not_a(a):
78-
# return ?? a
79-
pass
78+
return not a
79+
8080

8181
check_that_these_are_equal(not_a(True), False)
8282
check_that_these_are_equal(not_a(False), True)

0 commit comments

Comments
 (0)