title: Swift for-in loop dictionary experiment
body: <p>I'm almost a complete programming beginner and I've started to go through a Swift ebook from Apple.</p>
  
  <p>The things I read are pretty clear, but once you start to experiment things get tricky :).</p>
  
  <p>I'm stuck with the experiment in the Control Flow section. Here is the initial code:</p>
  
  <pre><code>let interestingNumbers = [
      "Prime": [2, 3, 5, 7, 11, 13],
      "Fibonacci": [1, 1, 2, 3, 5, 8],
      "Square": [1, 4, 9, 16, 25],
  ]
  
  var largest = 0
  for (kind, numbers) in interestingNumbers {
      for number in numbers {
          if number &gt; largest {
              largest = number
          }
      }
  }
  
  largest
  </code></pre>
  
  <p>And here is the task:</p>
  
  <blockquote>
    <p>Add another variable to keep track of which kind of number was the
    largest, as well as what that largest number was.</p>
  </blockquote>
  
  <p>As I understand, they want me to add up all the values in each number kind (get a total sum for Prime, Fibonacci and Square) and then compare the result to show the largest result.
  But I can't figure out the syntax.</p>
  
  <p>Can someone share any advice on how to tackle this experiment?
  Maybe I'm not understanding the problem?</p>