diff -r 6253f4681451 -r a7afc2540a88 cws/cw01.tex --- a/cws/cw01.tex Wed Nov 09 15:07:23 2016 +0000 +++ b/cws/cw01.tex Thu Nov 10 00:15:14 2016 +0000 @@ -80,7 +80,7 @@ \item[(2)] Write a second function that takes an upper bound as argument and calculates the steps for all numbers in the range from 1 up to this bound. It returns the maximum number of steps and the - corresponding number that needs that many steps. More precisely + corresponding number that needs that many steps. More precisely, it returns a pair where the first component is the number of steps and the second is the corresponding number. \hfill\mbox{[1 Mark]} @@ -122,7 +122,7 @@ to buy and when to sell this commodity. In the example above it should return the pair $\texttt{(1, 3)}$ because at index $1$ the price is lowest and then at index $3$ the price is highest. Note the prices are given as -lists of \texttt{Float}s.\newline \mbox{} \hfill[1 Mark] +lists of \texttt{Double}s.\newline \mbox{} \hfill[1 Mark] \item[(2)] Write a function that requests a comma-separated value (CSV) list from the Yahoo websevice that provides historical data for stock @@ -183,13 +183,13 @@ \subsection*{Advanced Part 3 (3 Marks)} -A purely fictional character named Mr T.~Drump inherited in 1978 -approximately 200 Million Dollar from his father. Mr Drump prides +A purely fictional character named Mr T.~Drumb inherited in 1978 +approximately 200 Million Dollar from his father. Mr Drumb prides himself to be a brilliant business man because nowadays it is estimated he is 3 Billion Dollar worth (one is not sure, of course, -because Mr Drump refuses to make his tax records public). +because Mr Drumb refuses to make his tax records public). -Since the question about Mr Drump's business acumen remains, let's do a +Since the question about Mr Drumb's business acumen remains open, let's do a quick back-of-the-envelope calculation in Scala whether his claim has any merit. Let's suppose we are given \$100 in 1978 and we follow a really dump investment strategy, namely: @@ -212,7 +212,7 @@ \end{itemize}\medskip \noindent -\textbf{Tasks (file drump.scala):} +\textbf{Tasks (file drumb.scala):} \begin{itemize} \item[(1.a)] Write a function that queries the Yahoo financial data @@ -310,7 +310,7 @@ turn out to be a blue chip company. Also, since the portfolios are chosen from the current S\&P 500, they do not include the myriad of companies that went bust or were de-listed over the years. -So where does this leave our fictional character Mr T.~Drump? Well, given +So where does this leave our fictional character Mr T.~Drumb? Well, given his inheritance, a really dumb investment strategy would have done equally well, if not much better. \end{document}