title: Evaluate expression `3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6`
body: <p>Consider this expression <code>3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6</code>.</p>
  
  <p><a href="https://duckduckgo.com/?q=3%20%2B%202%20%2B%201%20-%205%20%2B%204%20%25%202%20-%201%20%2F%204%20%2B%206" rel="nofollow">DuckDuckGo</a> evaluates it to <code>6.75</code> (as does Google).</p>
  
  <p>Python 2 evaluates it to 7: </p>
  
  <pre><code>$ python
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) 
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; print 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6
  7
  &gt;&gt;&gt; ^D
  </code></pre>
  
  <p>Python 3 evaluates it to 6.75:</p>
  
  <pre><code>$ python3
  Python 3.4.0 (default, Apr  9 2014, 11:51:10) 
  [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; print(3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6)
  6.75
  &gt;&gt;&gt;`enter code here`
  </code></pre>
  
  <p>Why does Python 2 evaluate to 7 and Python 3 evaluate to 6.75?</p>
  
  <p>How does Python arrive at the result?</p>