![]() |
.. (לתיקייה המכילה) | |
What should sgimatria return in case of 1. the empty string 2. a string containing an illegal character
|
1. 0 2. ~1 |
Can we add as many local functions as we want?
| No. You are only allowed one auxiliary function, whether local or not. |
Can we use string.maxsize or other library functions that were not taught in class?
| No. Only use library functions that were taught in class or are shown in the slides |
In Q 3, how are we supposed to handle illegal values
(when even the types of the input values can be different on different occasions)
|
You are right. So let us reduce the requirement here. The string_curry implementations should be equivalent to sstutter/sgimatria etc. only on legal inputs. There is no need in this question to handle input that would be illegal in the equivalent function. |
What should we return for bad values in cstutter and sstutter?
|
You can decide for yourself. Just as long as you 1. try to maximize the range of legitimate input values 2. document your decisions 3. make common sensical decisions |

