title: how to find the largest value's key in a dictionary without built in functions
body: <p>I have task to find the largest value in a dictionary key and if there are keys that are both the largest value then we go with the largest key:
  so, for example: {&quot;1&quot;:5,&quot;6&quot;:1,&quot;2&quot;:3,&quot;4&quot;:5} I would want this to return 4
  what I've tried so far:</p>
  <pre><code>        largest = 0 
          for i in dict:
              val = dict[i]
              if val &gt; largest:
                  largest = value
         
  </code></pre>
  <p>this find the largest value but the wrong key for dictionaries like [&quot;2&quot;:3,&quot;4&quot;:1,&quot;2&quot;:3]</p>