379 \$349,597 for blue chips. Note when comparing these results with your |
379 \$349,597 for blue chips. Note when comparing these results with your |
380 own calculations: there might be some small rounding errors, which |
380 own calculations: there might be some small rounding errors, which |
381 when compounded, lead to moderately different values.\bigskip |
381 when compounded, lead to moderately different values.\bigskip |
382 |
382 |
383 \noindent |
383 \noindent |
384 \textbf{Hints:} useful string functions: \texttt{startsWith(...)} for |
384 \textbf{Hints:} useful string functions: \texttt{.startsWith(...)} for |
385 testing a string having a given prefix, \texttt{\_ + \_} for |
385 checking whether a string has a given prefix, \texttt{\_ + \_} for |
386 concatenating twop strings; useful option functions: \texttt{.flatten} |
386 concatenating two strings; useful option functions: \texttt{.flatten} |
387 flattens a list of options such that it filters way all |
387 flattens a list of options such that it filters way all |
388 \texttt{None}'s, \texttt{Try(...) getOrElse ...} runs some code that |
388 \texttt{None}'s, \texttt{Try(...) getOrElse ...} runs some code that |
389 might raise an exception, if yes, then a default value can be given; |
389 might raise an exception, if yes, then a default value can be given; |
390 useful list functions: \texttt{.head} for obtaining the first element |
390 useful list functions: \texttt{.head} for obtaining the first element |
391 in a non-empty list, \texttt{.length} for the length of a |
391 in a non-empty list, \texttt{.length} for the length of a |