diff --git a/examples/03_multipart/config/config.json b/examples/03_multipart/config/config.json index 0063dd4..26ff342 100644 --- a/examples/03_multipart/config/config.json +++ b/examples/03_multipart/config/config.json @@ -3,16 +3,16 @@ // Each part will appear as a different submission box. "part_names" : [ "Part 1", "Part 2", "Part 3" ], - // Submissions for each part are just placed in the part1, part2, etc. - // directories. From there, they can be graded in the same manner as any + // Submissions for each part are just placed in the part1, part2, etc. + // directories. From there, they can be graded in the same manner as any // other submission. "testcases" : [ { "title" : "Part 1 Compute square root", - "command" : "python part1/*.py", + "command" : "python3 part1/*.py", "points" : 3, "validation" : [ - { + { "method" : "diff", "actual_file" : "STDOUT.txt", "description" : "Program Output", @@ -21,11 +21,11 @@ ] }, { - "title" : "Part 2 Solve for x^2 + 5x + 6 = 0", - "command" : "python part2/*.py", + "title" : "Part 2 Solve for x^2 + 5x + 6 = 0", + "command" : "python3 part2/*.py", "points" : 4, "validation" : [ - { + { "method" : "diff", "actual_file" : "STDOUT.txt", "description" : "Program Output", @@ -35,10 +35,10 @@ }, { "title" : "Part 3 Count from 1 to 10", - "command" : "python part3/*.py", + "command" : "python3 part3/*.py", "points" : 3, "validation" : [ - { + { "method" : "diff", "actual_file" : "STDOUT.txt", "description" : "Program Output", diff --git a/examples/03_multipart/submissions/part1.py b/examples/03_multipart/submissions/part1.py index 6cb088f..f5b3776 100644 --- a/examples/03_multipart/submissions/part1.py +++ b/examples/03_multipart/submissions/part1.py @@ -1,3 +1,3 @@ import math -print "The square root of 16:", math.sqrt(16) -print "The square root of 9:", math.sqrt(9) \ No newline at end of file +print("The square root of 16:", math.sqrt(16)) +print("The square root of 9:", math.sqrt(9)) diff --git a/examples/03_multipart/submissions/part1_syntax_error1.py b/examples/03_multipart/submissions/part1_syntax_error1.py index abefc78..fc2b12c 100644 --- a/examples/03_multipart/submissions/part1_syntax_error1.py +++ b/examples/03_multipart/submissions/part1_syntax_error1.py @@ -1,2 +1,2 @@ -print "The square root of 16:", math.sqrt(16) -print "The square root of 9:", math.sqrt(9) \ No newline at end of file +print("The square root of 16:", math.sqrt(16)) +print("The square root of 9:", math.sqrt(9)) diff --git a/examples/03_multipart/submissions/part1_syntax_error2.py b/examples/03_multipart/submissions/part1_syntax_error2.py index a6ad3d9..57cb060 100644 --- a/examples/03_multipart/submissions/part1_syntax_error2.py +++ b/examples/03_multipart/submissions/part1_syntax_error2.py @@ -1,2 +1,2 @@ -print "The square root of 16:", 16^(0.5) -print "The square root of 9:", 9^(0.5) \ No newline at end of file +print("The square root of 16:", 16^(0.5)) +print("The square root of 9:", 9^(0.5)) diff --git a/examples/03_multipart/submissions/part1_wrong_output.py b/examples/03_multipart/submissions/part1_wrong_output.py index 715cf82..27f5f61 100644 --- a/examples/03_multipart/submissions/part1_wrong_output.py +++ b/examples/03_multipart/submissions/part1_wrong_output.py @@ -1,5 +1,5 @@ import math -print "The square root of 16:" -print math.sqrt(16) -print "The square root of 9:" -print math.sqrt(9) \ No newline at end of file +print("The square root of 16:") +print(math.sqrt(16)) +print("The square root of 9:") +print(math.sqrt(9)) diff --git a/examples/03_multipart/submissions/part2.py b/examples/03_multipart/submissions/part2.py index 01370ac..3e0a599 100644 --- a/examples/03_multipart/submissions/part2.py +++ b/examples/03_multipart/submissions/part2.py @@ -6,6 +6,6 @@ x1 = ((-1)*b + math.sqrt(b*b - 4*a*c))/(2*a) x2 = ((-1)*b - math.sqrt(b*b - 4*a*c))/(2*a) -print "Solution to equation x^2 + 5x + 6 = 0:" -print "x1 =", x1 -print "x2 =", x2 \ No newline at end of file +print("Solution to equation x^2 + 5x + 6 = 0:") +print("x1 =", x1) +print("x2 =", x2) diff --git a/examples/03_multipart/submissions/part2_syntax_error1.py b/examples/03_multipart/submissions/part2_syntax_error1.py index 246dc2d..2f1cc5a 100644 --- a/examples/03_multipart/submissions/part2_syntax_error1.py +++ b/examples/03_multipart/submissions/part2_syntax_error1.py @@ -6,6 +6,6 @@ x1 = ((-1)*b + math.sqrt(b*b - 4*a*c))/(2*a) x2 = ((-1)*b - math.sqrt(b*b - 4*a*c))/(2*a) -print "Solution to equation x^2 + 5x + 6 = 0:" -print "x1 =" + x1 -print "x2 =" + x2 \ No newline at end of file +print("Solution to equation x^2 + 5x + 6 = 0:") +print("x1 =" + x1) +print("x2 =" + x2) diff --git a/examples/03_multipart/submissions/part2_wrong_output.py b/examples/03_multipart/submissions/part2_wrong_output.py index c01ccdf..164b91c 100644 --- a/examples/03_multipart/submissions/part2_wrong_output.py +++ b/examples/03_multipart/submissions/part2_wrong_output.py @@ -6,6 +6,6 @@ x1 = ((-1)*b + math.sqrt(b*b - 4*a*c))/(2*a) x2 = ((-1)*b - math.sqrt(b*b - 4*a*c))/(2*a) -print "Solution to equation x^2 + 5x + 6 = 0:" -print "x1 = ", x1 -print "x2 = ", x2 \ No newline at end of file +print("Solution to equation x^2 + 5x + 6 = 0:") +print("x1 = ", x1) +print("x2 = ", x2) diff --git a/examples/03_multipart/submissions/part3.py b/examples/03_multipart/submissions/part3.py index 5c76402..7785751 100644 --- a/examples/03_multipart/submissions/part3.py +++ b/examples/03_multipart/submissions/part3.py @@ -1,2 +1 @@ -for i in range(1,11): - print i, \ No newline at end of file +print(" ".join([str(x) for x in range(1, 11)])) diff --git a/examples/03_multipart/submissions/part3_syntax_error1.py b/examples/03_multipart/submissions/part3_syntax_error1.py index ccf9402..a48f24d 100644 --- a/examples/03_multipart/submissions/part3_syntax_error1.py +++ b/examples/03_multipart/submissions/part3_syntax_error1.py @@ -1,2 +1,2 @@ for (i in range(1,11)): - print i, \ No newline at end of file + print(i,) diff --git a/examples/03_multipart/submissions/part3_wrong_output.py b/examples/03_multipart/submissions/part3_wrong_output.py index 14d90f3..93bb199 100644 --- a/examples/03_multipart/submissions/part3_wrong_output.py +++ b/examples/03_multipart/submissions/part3_wrong_output.py @@ -1,2 +1,2 @@ for i in range(1,10): - print i, \ No newline at end of file + print(i,)