\begin{algorithmic}[1]
\Function{Mean}{floatlist}
\State mean $\gets$ 0.0
\For{entry \textbf{in} floatlist}
\State mean $\gets$ mean + entry
\EndFor
\If{floatlist.length > 0}
\State mean $\gets$ mean / floatlist.length
\EndIf \\
\Return mean
\EndFunction
\end{algorithmic}