Components of interactive exercises
1. Components of interactive exercises
You have just seen how to make a great video exercise. After watching the videos, learners practice the concepts introduced through interactive exercises. Interactive exercises should only use the ideas and tools introduced in the video since their purpose is to reinforce what the learner has just seen and check their understanding. This lesson describes the different interactive exercise types and their components.2. Exercise components
We've briefly mentioned different exercise components in previous chapters, but now let's take some time to examine each in detail. See here the exercise context, instructions, hint button, script/solution window, and console or shell. Let's explore these as a learner would when completing an exercise.3. Coding exercise: Context
The first is the context, which is the high-level description of an exercise that provides details about the learning objective, what the learner is about to solve, and why. Any relevant background information goes here.4. Coding exercise: Instructions
The instructions are located underneath the context section. Instructions are the steps a learner should follow to solve a Coding exercise. Each instruction generally corresponds to one line of code.5. Coding exercise: Hints
Hints are key to making a great exercise. learners ask for this when they need help with an answer. A good heuristic for hints is that they should get the learner halfway to the answer.6. Coding exercise: Sample code
The key to writing good Coding exercises is not only to provide clear instructions but also good sample code. This is the code made available at the beginning of the exercise in the script window and has to be filled out by the learners. Sample code is created in parallel with the instructions as all these parts work together to ensure a positive experience for DataCamp learners.7. Coding exercise: Solution code
Solution code is the solution for the exercise. This code is available in the script window to learners when they click "Show Answer." DataCamp's feedback system compares the learner's submission with this code to determine whether the exercise was solved correctly.8. Writing good sample code
In the course editor, both the sample code and solution must be provided. Sample code includes comments and code scaffolding. There should be a one-to-one mapping of comments in the sample code to the instructions and comments in sample and solution code must match. Comments in DataCamp exercises are intended to be abbreviated instructions, so it is very important that they briefly but clearly describe the task to be completed. As you can see in this example, there are different levels of scaffolding. Writing code is one of the fun things about completing DataCamp courses, so use the least amount of scaffolding that will allow the learners to complete the exercise without resorting to hints.9. Using hotkeys
When creating and editing code in the Teach editor, you may make frequent changes and tweaks. It can be easier to preview the code to make sure it matches. Instead of clicking the "show hint" and "show solution" button to achieve this, you can simply hit ctrl plus h once to see the hint, and again to see the solution code. This will make it much easier to compare the two to spot any discrepancies.10. Coding exercise: Console
Another exercise component is the console, where output is shown, and the learner can execute commands to experiment with the code and variables.11. Coding exercise: Success message
The last component is the success message. This message is returned to a learner upon successful completion of an exercise. An ideal success message consists of a few words of praise, followed by one or two sentences of something informative. You can either draw attention to the results or motivate the next exercise.12. Let's start exercising!
Now you know the building blocks of an exercise. Let's start exercising!Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.