This code will not run! First, fix the
random statement to reflect the range of numbers that you wish to have in your math test. Then,
following the logic, see how the variable
sum holds the correct answer, and
ans is the
answer the person typed? Given that the red LED (for the wrong answer) is on pin 13 and the green LED (for the correct answer)
is on pin 12, fix the
if statement condition and the two
digitalwrite line make this all happen.
Here is what your Arduino assembly should look like for this lesson: