Skip to content

Commit b16a3e6

Browse files
Merge pull request #150 from LaunchCodeEducation/ticket/270
Resolved ticket 270
2 parents 0dce2a5 + ee9db01 commit b16a3e6

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

  • content/booleans-and-conditionals/reading/logical-operators

content/booleans-and-conditionals/reading/logical-operators/_index.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,16 @@ to be true for the overall result to be `True`.
108108
Let's look at another code example. Change the value of `num` to see when
109109
each combined expression returns `True`.
110110

111-
Using `num = 5`, lines 2 and 4 both return `True` because at least one of
112-
the two comparisons is `True`. Line 6 returns `False` because both of the
111+
```python {linenos=tabel}
112+
num = 5
113+
114+
print(num > 0 or num < 10)
115+
print(7 > num or num == 3)
116+
print(num*5 > 100 or 'dog' == 'cat')
117+
```
118+
119+
Using `num = 5`, lines 3 and 4 both return `True` because at least one of
120+
the two comparisons is `True`. Line 5 returns `False` because both of the
113121
comparisons are `False`.
114122

115123
{{% notice green Tip %}}
@@ -221,4 +229,4 @@ Predict if each of the following expressions evaluates to `True` or
221229

222230
{{% /notice %}}
223231

224-
<!-- True, False, False, True -->
232+
<!-- True, False, False, True -->

0 commit comments

Comments
 (0)