14 lines
1.8 KiB
Markdown
14 lines
1.8 KiB
Markdown
|
|
# Return value
|
||
|
|
|
||
|
|
TODO: ADD MORE
|
||
|
|
|
||
|
|
- the knowledge of `return` statement could be a useful concept in this exercise [variable-length-quantity](../exercise-concepts/variable-length-quantity.md)
|
||
|
|
- the function must return a number (int) [hamming](../exercise-concepts/hamming.md)
|
||
|
|
- Most of the functions in the example solution specify a _return_ value using the `return` keyword. [markdown](../exercise-concepts/markdown.md)
|
||
|
|
- the exercise must use a `return` statement to return a value to the caller [leap](../exercise-concepts/leap.md)
|
||
|
|
- this function return a string by this line: `return text[::-1]` [reverse-string](../exercise-concepts/reverse-string.md)
|
||
|
|
- the `return` keyword is used in a _return statement_ at the end of a function. Exits a function and may or may not pass data or an expression back to calling code. Functions in python without an expicit `return` keyword and statment will return (pass back) the singleton object `none`. The example code _returns_ a copy of the passed-in argument (assumed to be a string) that has been mapped through `str.translate()`, using the table made from `str.maketrans()` [rna-transcription](../exercise-concepts/rna-transcription.md)
|
||
|
|
- knowing that functions need not have _explicit_ return statements or values but will return `None` if `return` is not specified. Except for the two `@property`-decorated functions, all of the functions in the example omit an explicit `return` statment and all return `None`. [robot-simulator](../exercise-concepts/robot-simulator.md)
|
||
|
|
- the knowledge of `return` statement could be a useful concept in this exercise [variable-length-quantity](../exercise-concepts/variable-length-quantity.md)
|
||
|
|
- "row" and "column" list values are expected from defined instance method(s) [matrix](../exercise-concepts/matrix.md)
|