Menu
Coddy logo textTech

Recap - Simple Logic

Part of the Fundamentals section of Coddy's Python journey. Lesson 17 of 77.

challenge icon

Challenge

Beginner

You are given a code with variables b1, b2, and b3 that are set to placeholder values. Change each one to either True or False so that the final result b4 will be True.

Important: Only change the values of b1, b2, and b3. Do not modify the line that calculates b4 or any other lines.

Look at the expression b4 = b1 and b2 and (not b3) to understand what values are needed.

Try it yourself

# Replace each placeholder below with the boolean value the task describes
b1 = False
b2 = False
b3 = True

# Don't change the lines below
b4 = b1 and b2 and (not b3)
print(f"b4 = {b4}")

All lessons in Fundamentals

Practice on your own: Online Python compiler