Recap - Simple Logic
Part of the Fundamentals section of Coddy's Python journey — lesson 17 of 77.
Challenge
BeginnerYou are given a code with variables b1, b2, and b3 that have question marks instead of values. Replace each question mark with either True or False so that the final result b4 will be True.
Important: Only replace the question marks in 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
b1 = ?
b2 = ?
b3 = ?
# Don't change the lines below
b4 = b1 and b2 and (not b3)
print(f"b4 = {b4}")All lessons in Fundamentals
4Operators Part 2
Logical Operators Part 1Logical Operators Part 2Recap - Simple LogicLogical Operators Part 3Logical Operators Part 48Loops
For LoopWhile LoopBreakContinueRecap - FactorialThe Range FunctionNested LoopRecap - Dynamic Input3Operators Part 1
Arithmetic OperatorsModulo OperatorArithmetic ShortcutsRecap - Simple MathComparison Operators9Functions
Declare a FunctionArgumentsReturnRecap - Sigma FunctionRecap - Validation FunctionDefault Values12Iterating Over Sequences
Iterating Over ElementsThe Enumerate FunctionIterating Over Strings Part 1Iterating Over Strings Part 2