/code>. The <code>multiply_columns()</code> function multiplies the <code>city[, 3]</code> (<code>nairobi</code>) and <code>city[, 3 + 1]</code> (<code>genoa</code>) columns and stores it in the <code>temp[[3]]</code> which is the third element of the <code>temp</code> list.</p>
<p>So can you see why we used <code>ncol(city) - 1</code> when we first set up our loop? As we have four columns in our <code>city</code> data frame if we didn’t use <code>ncol(city) - 1</code> then eventually we’d try to add th