# This holds a gradebook for a class.
# The gradebook is a list of entries, with each entry representing the name
# and grades of one student.  An entry is also a list, whose first element
# is the student's name, and whose remaining elements are the student's grades.
# With two grades per student the gradebook might look like this:
# [
#    [ "bob", 23, 49],
#    [ "mary", 89, 96],
#    [ "suzie", 99, 100]
# ]

def GetNewClassList( gradebook ):
    # This has a loop that reads names.  The loop stops when it
    # gets a blank name.  For each non-blank name it adds the
    # LIST [name] to the gradebook.
    

def NewGrade( gradebook ):
    # This has a loop that runs through each entry in gradebook.
    # For each entry you print the name (which should be element [0]
    # of the entry) as a prompt, and read the number
    # inputted by the user.  Whatever this number is, append it to the
    # end of the entry.


def PrintGrades( gradebook ):
    # You can use this as a guideline.  If your first two functions are
    # working correctly, this will print the contents of the gradebook.
    for line in gradebook:
        print "%-10s" %line[0],
        for i in range(1, len(line)):
            print "%5d " %line[i],
        print


def main():
    gradebook = []
    GetNewClassList( gradebook )
    command = ""
    while command != "quit":
        print "Command ('print', 'new', 'quit'): ",
        command = raw_input()
        if command == "print":
            PrintGrades( gradebook )
        elif command == "new":
            NewGrade( gradebook )


main()
