<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Grade Calculator</title>
    <description>The latest articles on DEV Community by Grade Calculator (@gradecalculator).</description>
    <link>https://dev.to/gradecalculator</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F843681%2F0008eb6e-7360-410d-9c04-72e637742d34.png</url>
      <title>DEV Community: Grade Calculator</title>
      <link>https://dev.to/gradecalculator</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gradecalculator"/>
    <language>en</language>
    <item>
      <title>College Weighted Grade Calculator With Pure HTML, CSS &amp; JS</title>
      <dc:creator>Grade Calculator</dc:creator>
      <pubDate>Sun, 10 Apr 2022 09:46:01 +0000</pubDate>
      <link>https://dev.to/gradecalculator/college-weighted-grade-calculator-with-pure-html-css-js-2p00</link>
      <guid>https://dev.to/gradecalculator/college-weighted-grade-calculator-with-pure-html-css-js-2p00</guid>
      <description>&lt;p&gt;I worked on a weighted grade calculator project for &lt;a href="https://www.thebestdegree.com/"&gt;thebestdegree.com&lt;/a&gt;. After some research, I found JS static HTML is the best way for the project. I share some thoughts when building the project, and hopefully it adds knowledge to the community.&lt;/p&gt;

&lt;h2&gt;
  
  
  Functions Added
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Assignment grade, course grade percentage. Example: grade 83, percentage 15. Percentage/point change - Advanced Mode Options if you're looking for a tool that can help you set your grading scale, this function is a must. Final page layout with CSS can be seen on the &lt;a href="https://www.thebestdegree.com/grade-calculator/"&gt;weighted grade calculator&lt;/a&gt; page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For converting the percentage grade points to letter capital part, the following &lt;a href="https://ww2.hunter.cuny.edu/students/academic-planning/degree-requirements/construct-an-academic-plan/gpa-calculator/grading-scale/"&gt;grading scale table&lt;/a&gt; was used as a reference.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set an Add Row button to add additional input fields. After entering the data, press the "Calculate" button and  the weighted calculated grade point average is to be shown in the results area. Also, The following formula was used to calculate the minimum grade you need to achieve on the final exam: Requirements = (Aim - Current × (100% - Final Weight)) / Final Weight.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Javascript code to fill some of the functions above
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$("#points").delegate(".changetopoints", "click", function() {

    $(".grade").attr("placeholder","Grade(points) e.g. 15");
        $(".weight").attr("placeholder","Points Available(points) e.g. 20");
        $("#points").addClass("is-primary");
        $("#percent").removeClass("is-primary");    
        document.getElementById("totalpoints").style = "margin-top:0.6em; margin-left:0.6em; display:block;";
        $("#percent").removeClass("click");
        $("#percent").addClass("nonclick");
        $("#points").removeClass("nonclick");
        $("#points").addClass("click");
        tip.innerHTML = "Points received in the blue column, points available in the red column."
        reset();
    });

    $("#percent").delegate(".changetopecent", "click", function() {
        $(".grade").attr("placeholder","Grade(%) e.g. 75");     
        $(".weight").attr("placeholder","Weight(%) e.g. 15");
        $("#points").removeClass("is-primary");
        $("#percent").addClass("is-primary");
        document.getElementById("totalpoints").style = "margin-top:-0.6em; margin-left:0.6em; display:none;";
        $("#percent").removeClass("nonclick");
        $("#percent").addClass("click");
        $("#points").removeClass("click");
        $("#points").addClass("nonclick");
        tip.innerHTML = "Grades in the blue column, weights in the red column. "
        reset();

    });
    $("#reset").click(function() {
        reset();

    });
    $("#assignment").delegate(".add", "click", function() {
        if($("#percent").is(".is-primary")){
        $newRow = " &amp;lt;div class='field is-horizontal'&amp;gt;"+"&amp;lt;div class='field-label is-small'&amp;gt;"+"&amp;lt;label class='label'&amp;gt;"+row+".&amp;lt;/label&amp;gt;"+"&amp;lt;/div&amp;gt;"+
                                                "&amp;lt;div class='field-body'&amp;gt;"+
                                                    "&amp;lt;div class='field'&amp;gt;"+

                                                        "&amp;lt;p class='control is-expanded has-icons-left'&amp;gt;"+
                                                            "&amp;lt;input class='input is-rounded is-small is-info grade'"+
                                                            "onkeypress='return isNumberKey(event)' type='text' placeholder='Grade(%) e.g. 75'&amp;gt;"+
                                                            "&amp;lt;span class='icon is-small is-left'&amp;gt;"+
                                                                "&amp;lt;i class='fas fa-pencil-alt'&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;"+
                                                    "&amp;lt;div class='field'&amp;gt;"+
                                                        "&amp;lt;div class='control is-expanded has-icons-left'&amp;gt;"+
                                                            "&amp;lt;input class='input is-small is-rounded is-danger weight' onkeypress='return isNumberKey(event)' type='text' placeholder='Weight(%) e.g. 15'&amp;gt;"+
                                                            "&amp;lt;span class='icon is-small is-left'&amp;gt;"+
                                                            "&amp;lt;i class='fas fa-pencil-alt'&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;";

        }
        else{
        $newRow = " &amp;lt;div class='field is-horizontal'&amp;gt;"+"&amp;lt;div class='field-label is-small'&amp;gt;"+"&amp;lt;label class='label'&amp;gt;"+row+".&amp;lt;/label&amp;gt;"+"&amp;lt;/div&amp;gt;"+
                                                "&amp;lt;div class='field-body'&amp;gt;"+
                                                    "&amp;lt;div class='field'&amp;gt;"+

                                                        "&amp;lt;p class='control is-expanded has-icons-left'&amp;gt;"+
                                                            "&amp;lt;input class='input is-rounded is-small is-info grade'"+
                                                            "onkeypress='return isNumberKey(event)' type='text' placeholder='Grade(points) e.g. 15'&amp;gt;"+
                                                            "&amp;lt;span class='icon is-small is-left'&amp;gt;"+
                                                                "&amp;lt;i class='fas fa-pencil-alt'&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;"+
                                                    "&amp;lt;div class='field'&amp;gt;"+
                                                        "&amp;lt;div class='control is-expanded has-icons-left'&amp;gt;"+
                                                            "&amp;lt;input class='input is-small is-rounded is-danger weight' onkeypress='return isNumberKey(event)' type='text' placeholder='Points available(points) e.g. 20'&amp;gt;"+
                                                            "&amp;lt;span class='icon is-small is-left'&amp;gt;"+
                                                            "&amp;lt;i class='fas fa-pencil-alt'&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;";

        }
        $("#table").append($newRow);         
        row += 1;

    });

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>html</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
