3.1 General Form
A Public Question’s autograder code combines General and Special Checks like the following:
#Public Question 2 Autograder Code
#Testing Student's Question 2 Against Question 2 Solution
#Initializing test.results[2, ]
test.results[2, ] <- c("Part 1 Question 2 (Public)", 0, 20, "Try again.")
#General Check 1
if(test_condition){
code...
#General Check 2
}else if(test_condition){
code...
#Special Check 1
}else if(test_condition){
code...
#Special Check 2
}else if(test_condition){
code...
.
.
.
#Last General Check
}else if(test_condition){
code...
}
We will learn a variety of Checks in the following sections.