Errors in Program Code

orders are example of statements

What happens if we make mistake in the program? Regard the simplest one-line program we already learnt:

print('Mary Had A Little Lamb')

This second case have two variations: either program will fail immediately on start (due to some major error with its "syntax") or it will fail only when execution comes to the wrongly spelled keyword.

In our exercises you'll see errors, if any, below the "output" box. Always read them carefully - normally they hint about line number where mistake is (sometimes it may be on preceding line actually).

To have a little practice on recognizing errors, here is a program similar to previous one, but with few mistakes. Click Run button, examine errors and try fixing them. Repeat this until all errors are fixed. If you need hints, click the phrase below: