title: javascript not functioning
body: <p>Why isn't this HTML/JavaScript code working? It's an exams calculator.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function calculate() {
    var f = parseFloat(document.getElementById("first").value);
    var s = ParseFloat(document.getElementById("second").value);
    var q = parseFloat(document.getElementById("quizes").value);
    var h = parseFloat(document.getElementById("homeworks").value);
    var fi = parseFloat(document.getElementById("final").value);
    alert(f / 4 + s / 4 + q / 2 + h / 2 + fi * 0.4);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p&gt; first:&lt;input type="number" id="first" &lt;/p&gt;
  &lt;p&gt; second:&lt;input type="number" id="second" &lt;/p&gt;
  &lt;p&gt; quizes:&lt;input type="number" id="quizes" &lt;/p&gt;
  &lt;p&gt; homeworks:&lt;input type="number" id="homeworks" &lt;/p&gt;
  &lt;p&gt; final:&lt;input type="number" id="final" &lt;/p&gt;
  &lt;button onclick="calculate()"&gt;calculate&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>