Autolab automatically grades your lab and assignment submissions by scanning your program's output and compairing it against what is output by the professor's version which adheres to the output specification of the lab/assignment. If your program is compliant with the output specification it will be autograded at 80%. If not compliant, your autograde will be less, possibly 0%. When not 80% you should examine the errors describd by Autograder to figure out how to fix/update your program to adhere to the output specification and get 80%. Future labs after Lab 1 will not get a 100% grade if autograder doesn't autograde your submission at 80%.
The most common output errors fall into one of the following categories:
Useful Tip: It can sometimes be difficult to see why your program's output is not correct and not the same as the output specification. One trick you can use to determine differences is to copy/paste your program's output into a text editor. Then, copy/paste the output specifications output into another text editor session. Lastly, tile those two text editor sessions on your computer's desktop (have them side-by-side) and look for differences including missing/added blank lines, incorrect/missing words, etc. When you see differences fix your program, and repeat the process until there are no differencs.
The general approach Autograder uses to describe how your program's output is incorrect is by saying what output it "expected" versus what output your program generated (the "but was" output).
Please consider the following error examples to better understand how Autograder describes the output errors of your program:
Example #1: Lab 1 - "M-I Crooked Letter" requires the student to author a program that prints out ASCII letters to spell the word MISSISSIPPI. The lab assignment is here.
A common Lab 1 output error is to have the letter I always printed out with a blank line after it. A blank line between letters is expected but not after the last letter I.
Autolab describes this error as shown below. Note how it shows the "expected" having open and closed square brackets with nothing in between after the I, while the "but was" shows square brackets containing a newline/line break as signified by the open bracket being on one line and the closed bracket on the next line. In this example autograder is specifically saying that what was expected what "nothing" and what was output had a newline/line break.
ERROR: exact output does not match
expected:<... II
II
IIIIII
[]> but was:<... II
II
IIIIII
[
]>
Example #2: Lab 2 - "Give Me a Second!" requires the student to author a program that asks the user for a number of seconds and then calculates hours, days, etc. from the input provided. The lab assignment is here.
A common error in Lab 2 output is when a program does not print blank lines as needed. Please see below where the "Enter number of seconds" prompt, "Number of seconds" line and the "Goodbye" salutation do not start on a new line as required. Additionally, the actual output does not include tabs where the expected output does:
ERROR: exact output does not match
expected:<[
Enter a number of seconds as a whole number or 0 to quit:
Number of seconds entered is 723675 and that equates to:
8 days
201 hours
12061 minutes
8:09:01:15 days, hours, minutes and seconds (D:HH:MM:SS:)
Enter a number of seconds as a whole number or 0 to quit:
]0 entered. Goodbye!
> but was:<[Enter a whole number of seconds or 0 to quit:Number of seconds entered is 723675 and that equates to:
8 days
201 hours
12061 minutes
Enter a whole number of seconds or 0 to exit the program:]0 entered. Goodbye!
>
Another Lab 2 example of bad output is from a submission that not only doesn't have proper blank lines and tabs in place, but also has incorrect literal string output though calcuations performed by the program are correct.
See below where the days, hours, minutes calculations output is malformed, including equals signs where the output specification calls for a different format. Also, for the last line of output, the digital clock, leading zeroes where expected but are not included:
ERROR: exact output does not match
expected:<[
Enter a number of seconds as a whole number or 0 to quit:
Number of seconds entered is 723675 and that equates to:
8 days
201 hours
12061 minutes
8:09:01:15 days, hours, minutes and seconds (D:HH:MM:SS:)
Enter a number of seconds as a whole number or 0 to quit:
]0 entered. Goodbye!
> but was:<[Enter a whole number of seconds or 0 to exitDays=8
Hours=201
Minutes=12061
8:09:01:15 days, hours, minutes and seconds (D:HH:MM:SS:)
Enter a number of seconds]0 entered. Goodbye!
>