Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions examples/03_multipart/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions examples/03_multipart/submissions/part1.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import math
print "The square root of 16:", math.sqrt(16)
print "The square root of 9:", math.sqrt(9)
print("The square root of 16:", math.sqrt(16))
print("The square root of 9:", math.sqrt(9))
4 changes: 2 additions & 2 deletions examples/03_multipart/submissions/part1_syntax_error1.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
print "The square root of 16:", math.sqrt(16)
print "The square root of 9:", math.sqrt(9)
print("The square root of 16:", math.sqrt(16))
print("The square root of 9:", math.sqrt(9))
4 changes: 2 additions & 2 deletions examples/03_multipart/submissions/part1_syntax_error2.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
print "The square root of 16:", 16^(0.5)
print "The square root of 9:", 9^(0.5)
print("The square root of 16:", 16^(0.5))
print("The square root of 9:", 9^(0.5))
8 changes: 4 additions & 4 deletions examples/03_multipart/submissions/part1_wrong_output.py
Original file line number Diff line number Diff line change
@@ -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)
print("The square root of 16:")
print(math.sqrt(16))
print("The square root of 9:")
print(math.sqrt(9))
6 changes: 3 additions & 3 deletions examples/03_multipart/submissions/part2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
print("Solution to equation x^2 + 5x + 6 = 0:")
print("x1 =", x1)
print("x2 =", x2)
6 changes: 3 additions & 3 deletions examples/03_multipart/submissions/part2_syntax_error1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
print("Solution to equation x^2 + 5x + 6 = 0:")
print("x1 =" + x1)
print("x2 =" + x2)
6 changes: 3 additions & 3 deletions examples/03_multipart/submissions/part2_wrong_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
print("Solution to equation x^2 + 5x + 6 = 0:")
print("x1 = ", x1)
print("x2 = ", x2)
3 changes: 1 addition & 2 deletions examples/03_multipart/submissions/part3.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
for i in range(1,11):
print i,
print(" ".join([str(x) for x in range(1, 11)]))
2 changes: 1 addition & 1 deletion examples/03_multipart/submissions/part3_syntax_error1.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
for (i in range(1,11)):
print i,
print(i,)
2 changes: 1 addition & 1 deletion examples/03_multipart/submissions/part3_wrong_output.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
for i in range(1,10):
print i,
print(i,)