예제 #1
0
def main(argv):
    test1 = ["Test", "Not anagram"]
    test2 = ["CAT", "TAC"]
    test3 = ["ANAGRAM", "MARANAG"]

    isCorrect = True
    #student = problemSet.Correct()

    test1_correct = str(correct_is_anagram(test1[0], test1[1]))
    test1_student = str(student.is_anagram(test1[0], test1[1]))
    print "Correct Output: " + test1_correct
    print "Your Output: "    + test1_student 
    if compare(test1_correct, test1_student):
        print "Correct!"
    else:
        print "Incorrect"
        isCorrect = False

    test2_correct = str(correct_is_anagram(test2[0], test2[1]))
    test2_student = str(student.is_anagram(test2[0], test2[1]))
    print "Correct Output: " + test2_correct
    print "Your Output: "    + test2_student 
    if compare(test2_correct, test2_student):
        print "Correct!"
    else:
        print "Incorrect"
        isCorrect = False

    test3_correct = str(correct_is_anagram(test3[0], test3[1]))
    test3_student = str(student.is_anagram(test3[0], test3[1]))
    print "Correct Output: " + test3_correct
    print "Your Output: "    + test3_student 
    if compare(test3_correct, test3_student):
        print "Correct!"
    else:
        print "Incorrect"
        isCorrect = False