Skip to content

Commit f2c4318

Browse files
committed
ternary operator -> conditional expression
use "conditional expression" as the main name, and only mention "ternary operator" as another name for a "conditional expression"
1 parent d55d861 commit f2c4318

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • exercises/practice/eliuds-eggs/.approaches/helper-functions

exercises/practice/eliuds-eggs/.approaches/helper-functions/content.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ First, `convert_to_binary()` is used to convert `display_value` to a binary stri
2929
Then, `count_ones()` is called to count the number of ones in that string.
3030

3131
In this specific version of the approach, `convert_to_binary()` is implemented similarly to the [modify the parameter in a loop][approach-parameter-modification] approach.
32-
The main differences are that the bits are converted to strings and appended together (rather being added together), and that a [ternary expression][ternary-expression] is used to handle the edge case of a `0`.
32+
The main differences are that the bits are converted to strings and appended together (rather being added together), and that a [conditional expression][conditional-expression] (also called a ternary operator) is used to handle the edge case of a `0`.
3333

3434
~~~~exercism/note
35-
Here, the [`or` operator][boolean-operations-default-or] could be used instead of a ternary expression:
35+
Here, the [`or` operator][boolean-operations-default-or] could be used instead of a conditional expression:
3636
3737
```python
3838
return binary_value[::-1] or "0"
@@ -70,4 +70,4 @@ However, if there are any unhandled edge cases, when you (or someone else) tries
7070

7171
[approach-convert-to-binary-string]: https://exercism.org/tracks/python/exercises/eliuds-eggs/approaches/convert-to-binary-string
7272
[approach-parameter-modification]: https://exercism.org/tracks/python/exercises/eliuds-eggs/approaches/parameter-modification
73-
[ternary-expression]: https://docs.python.org/3/reference/expressions.html#conditional-expressions
73+
[conditional-expression]: https://docs.python.org/3/reference/expressions.html#conditional-expressions

0 commit comments

Comments
 (0)