Commit 9ea22a3f authored by David Paul's avatar David Paul
Browse files

Add check for strings in dictionary in Exercise 4

parent ec1ceb5e
......@@ -50,6 +50,14 @@ exercise.checks = [Check("You should use a for loop to loop over all keys in one
Check("For this exercise, you need to initialise the dicrionary when it is created", "\[[\"']pen[\"']\](\\s)*=", True),
Check("For this exercise, you need to initialise the dicrionary when it is created", "\[[\"']paper[\"']\](\\s)*=", True),
Check("For this exercise, you need to initialise the dicrionary when it is created", "\[[\"']eraser[\"']\](\\s)*=", True),
Check("Weights should be numbers, not strings", "[\"']pencil[\"'](\\s)*:(\\s)*[\"']10", True),
Check("Weights should be numbers, not strings", "[\"']pen[\"'](\\s)*:(\\s)*[\"']20", True),
Check("Weights should be numbers, not strings", "[\"']paper[\"'](\\s)*:(\\s)*[\"']4", True),
Check("Weights should be numbers, not strings", "[\"']eraser[\"'](\\s)*:(\\s)*[\"']80", True),
Check("The number available should be a number, not a string", "[\"']pen[\"'](\\s)*:(\\s)*[\"']3", True),
Check("The number available should be a number, not a string", "[\"']pencil[\"'](\\s)*:(\\s)*[\"']5", True),
Check("The number available should be a number, not a string", "[\"']eraser[\"'](\\s)*:(\\s)*[\"']2", True),
Check("The number available should be a number, not a string", "[\"']paper[\"'](\\s)*:(\\s)*[\"']10", True),
Check("You need to specify the correct weights in a dictionary", "[\"']pencil[\"'](\\s)*:(\\s)*10"),
Check("You need to specify the correct weights in a dictionary", "[\"']pen[\"'](\\s)*:(\\s)*20"),
Check("You need to specify the correct weights in a dictionary", "[\"']paper[\"'](\\s)*:(\\s)*4"),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment