A key part of the IVLE worksheets are the programming exercises. You will find several of them interspersed amongst the text of a typical worksheet.

To complete a worksheet you must solve all of exercises that it contains.

Normally each exercise will require you to write a piece of code, and submit it for verification. Your submitted code will be automatically tested by IVLE against a number of different inputs. You will get feedback from IVLE about which test cases your solution passed, and which ones (if any) it failed. To complete the exercise you must pass all the test cases.

If you want to check how your code behaves before submitting it, click on the button labelled Run, at the bottom right hand corner below the exercise box. The result of Run will be displayed in the console window. When you believe your solution is ready for submission, click on the button labelled Submit, next to the Run button. You can submit as many attempts as you like for a particular problem.

Note

The IVLE system keeps a record of each submission you make, including which test cases were passed or failed. This information is aggregated and made available to teaching staff and curriculum developers so they can monitor student progress and improve the quality of the worksheets.

The test cases can be very picky about small details, things that we humans tend to overlook. Therefore you should pay close attention to the requirements of the exercise, and watch out for things such as:

Normally there are several test cases for each exercise. The first tests are usually the simplest and the most lenient in terms of correctness. Later tests become more challenging and stringent. When you fail a test case you will see a short message about the kind of thing your program did not do properly. This should give you some idea about what needs to be fixed in order to pass the test, although sometimes it might take a bit of thinking before you can resolve the problem. Don't be afraid to ask for help.