Skip to content

Commit 356c319

Browse files
committed
Fix a typo in logic (l -> lst)
1 parent c805142 commit 356c319

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

notebooks/04_logic.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,9 @@
530530
"In this example, the function `is_divisible_by_3(x)` returns `True` or `False` when `x` is (or is not) a multiple of $3$. Here, `True` and `False` are *Boolean values*. We may want to check whether \n",
531531
"a list `lst` of integers contains a multiple of $3$. For that, we use a special Python construction. First, `[is_divisible_by_3(x) for x in lst]` is the list of Boolean values `is_divisible_by_3(x)` for all elements `x` in the list `lst`. \n",
532532
"\n",
533-
"In our example, `l=[5,17,6,10]`, so this list equals `[False, False, True, False]` (only $6$ is divisible by $3$). Then, `any(S)` checks whether there exists a `True` value in `S`, and `not` reverses the answer. This way, we evaluate the statement *there is no element `x` in the list `lst` that is divisible by $3$*. \n",
533+
"In our example, `lst=[5,17,6,10]`, so this list equals `[False, False, True, False]` (only $6$ is divisible by $3$). Then, `any(S)` checks whether there exists a `True` value in `S`, and `not` reverses the answer. This way, we evaluate the statement *there is no element `x` in the list `lst` that is divisible by $3$*. \n",
534534
"\n",
535-
"In the next line, we evaluate the statement *all elements of `l` are not divisible by $3$* and get the same answer `False`: there is no good element in the list if and only if all elements are bad."
535+
"In the next line, we evaluate the statement *all elements of `lst` are not divisible by $3$* and get the same answer `False`: there is no good element in the list if and only if all elements are bad."
536536
]
537537
}
538538
]

0 commit comments

Comments
 (0)