I'm confused about what you are actually trying to achieve.

If the goal is to experiment with cgi scripts, or to satisfy some computer class homework assignment, this approach is fine. However, I hardly think entering 6 partial scores into a web page is the practical way to maintain grades for a class.

A spreadsheet is the obvious solution to the problem: MS Excel, GNU Gnumeric, Open Office Calc, or some other equivalent. One row for each student, one column for each landmark / assignment / test. Enter data for a column as each assignment / test is graded, and a column at the right will calculate the current total.

On a school-wide basis it would make sense to have a database, in which case you might enter the scores for all the students on assignment X at one time. But after that, no need for the user to enter the marks, the program can look them up from the database.

As Occam said: Entia non sunt multiplicanda praeter necessitatem.


In reply to Re: grade calulator coding problem by TomDLux
in thread grade calulator coding problem by friar tux

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.