Update logical_expressions.qmd

378 answ=3 => answ=1
615 `false` => `true`
This commit is contained in:
Fang Liu 2022-11-02 14:11:31 +08:00 committed by GitHub
parent 1d12303253
commit 09808b6094
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -375,7 +375,7 @@ choices = [
"``-1/a < -1/b``",
"``-1/a > -1/b``",
raw"``-1/a \geq -1/b``"]
answ = 3
answ = 1
radioq(choices, answ)
```
@ -612,7 +612,7 @@ The value for `true && missing` is `missing`, not a boolean value. What happens?
#| hold: true
#| echo: false
choices = ["""
In the manual we can read that "In the expression `a && b`, the subexpression `b` is only evaluated if `a` evaluates to true." In this case, `a` is `false` so `b` is evaluated and returned. As `b` is just `missing` that is the return value.
In the manual we can read that "In the expression `a && b`, the subexpression `b` is only evaluated if `a` evaluates to true." In this case, `a` is `true` so `b` is evaluated and returned. As `b` is just `missing` that is the return value.
""",
"Since the second value is \"`missing`\" all such answers would be missing."]
answ = 1