1) Read the 'programming introductory' notes here. | 2) Read the 'getting started' notes here. |
Exercise | Difficulty | Approx. Duration (MINS) | Learning Aims | Files | Theory Notes |
---|---|---|---|---|---|
Selection Exercises | |||||
The Calculator | ![]() |
30–60 | To complete this exercise the learner will need to implement basic selection (IF and else IF) to determine the calculation to be performed by the calculator: either add, divide, subtract or multiply. The exercise also requires the learner to use techniques such as the concatenation of string and basic operations, as well as the implementation of variables to store the users’ input. General system methods are also required to read and write content to/from the console. |
Activity
Solution Example |
Using Selection |
The Quiz | ![]() |
30–60 | To complete this exercise the learner will need to implement numerous selection techniques (either IF statements or CASE statements) to determine the users’ input given from a series of multiple-choice questions. Selection will also need to be used to determine the overall score. Apart from selection, this exercise will require the learner to concatenate outputs, implement variables to store user input and utilise system methods to read and write content to/from the console. |
Activity
Solution Example |
Using Selection |
Password Application | ![]() |
30–60 | To complete this exercise the learner will need to implement a single IF statement (or CASE statement) to compare the users’ input against a pre-defined username and password. This exercise requires the implementation of the keyword ELSE (or CASE ELSE if using CASE) to catch any other possibilities (in this case, incorrect user details). This exercise will also require the learner to concatenate outputs, implement variables to store user input and utilise system methods to read and write content to/from the console. |
Activity
Solution Example |
Using Selection |
Driving Licence | ![]() ![]() |
30–70 | To complete this exercise the learner will need to implement a single IF statement that stipulates multiple conditions using the ‘AND’ keyword. The IF statement should determine the status of the users’ driving licence based on their input. This exercise will also require the learner to concatenate outputs, implement variables to store user input and utilise system methods to read and write content to/from the console. |
Activity
Solution Example |
Using Selection |
The Subway | ![]() ![]() ![]() |
40–80 | To complete this exercise the learner will need to implement several selection statements, either IF or CASE, to determine the order of a customer. The learner will then need to use basic maths to calculate the total of the order and display it on the screen. This exercise will also require the learner to concatenate outputs, implement variables to store user input and utilise system methods to read and write content to/from the console. |
Activity
Solution Example |
Using Selection |
Iteration Exercises | |||||
The Multiplier Activity | ![]() ![]() |
30–70 | To complete this exercise the learner will need to implement basic iteration (in the form of a FOR loop) to repeat a sequence. The iteration will also have a start and end point which will be specified by the user. To complete this exercise the learner will need to use previous techniques already learnt, including concatenation, system variables and system methods (both read and write). |
Activity
Solution Example |
Using Iteration |
Odds and Evens | ![]() ![]() |
40–70 | To complete this exercise the learner will need to implement two FOR loops to repeat a sequence. The learner is required to use the step command to change the increment value of the loop. Both loops will also have a start and end point which will be specified by the user. To complete this exercise the learner will need to use previous techniques already learnt, including concatenation, system variables and system methods (both read and write). |
Activity
Solution Example |
Using Iteration |
Nesting Exercises | |||||
Exiting A Loop | ![]() |
15-30 | To complete this exercise the learner will need to implement a basic WHILE loop and use selection (either CASE or IF) to change the condition of the loop. To complete this exercise the learner will need to use previous techniques already learnt – namely system variables and system methods (both read and write). |
Activity
Solution Example |
Nesting |
Dave's Guessing Game | ![]() ![]() |
40–80 | To complete this exercise the learner will need to implement two loops to repeat a sequence – a loop inside a loop. The learner is also required to use selection techniques (either CASE or IF) that were practised previously in the earlier exercises. To complete this exercise the learner will need to use previous techniques already learnt, including concatenation, system variables and system methods (both read and write). This exercise also introduces how to generate a random number using the ‘Random’ class. |
Activity
Random Code Solution Example |
Nesting |
The Colour Mixer | ![]() ![]() |
30–60 | To complete this exercise the learner will need to nest an IF statement inside a second IF statement or use the ‘AND’ keyword to provide multiple options to the user. The exercise also implements system console colours. To complete this exercise the learner will need to use previous techniques already learnt – namely system variables and system methods (both read and write). |
Activity
Colour Code Solution Example |
Nesting |
The Cube | ![]() ![]() |
30–60 | To complete this exercise the learner will need to nest a loop inside another loop. The outer loop will create a blank ‘WriteLine’ and the inside loop must use the ‘Write’ method to add the required number of asterisks to the same line. The outer loop will require a start and end point to be specified by the user. To complete this exercise the learner will need to use previous techniques already learnt, including system variables and system methods (both read and write). |
Activity
Solution Example |
Nesting |
The Triangle | ![]() ![]() ![]() |
40–70 | To complete this exercise the learner will need to nest a loop inside another loop. The outer loop will create a blank ‘WriteLine’ and the inside loop must use the ‘Write’ method to add the required number of asterisks to the same line; this will need to increment to create the triangle effect. The outer loop will require a start and end point to be specified by the user. To complete this exercise the learner will need to use previous techniques already learnt, including system variables and system methods (both read and write). |
Activity
Solution Example |
Nesting |
Method and Function Exercises | |||||
Exchange Rates | ![]() ![]() ![]() ![]() |
50–100 | This exercise will require the learner to make code more efficient and manageable by grouping code together in separate methods and functions. The exercise will reinforce other techniques previously learned, such as selection, iteration, concatenation, numerical operators, the implementation of variables to store user input and system methods to read and write content to/from the console. This particular exercise will also require the learner to work with basic percentages. |
Activity
Simple Solution Advanced Solution Example |
Methods and Functions |
Advanced Exercises | |||||
The Juke Box | ![]() ![]() ![]() |
30–60 | To complete this exercise the learner is required to combine techniques used in previous exercises and apply them to this new scenario. As this exercise includes file handling (audio tracks), the learner is required to investigate the try/catch technique. The exercise also reinforces other techniques previously learned, such as selection, iteration, concatenation, numerical operators, the implementation of variables to store user input and system methods to read and write content to/from the console. This particular exercise will also require the learner to work with basic percentages. |
Activity
Files Solution Example |
Error Handling |
Wage Calculator | ![]() ![]() ![]() ![]() |
50–100 | To complete this exercise the learner is required to combine techniques used in previous exercises and apply them to this new scenario. This particular exercise will require knowledge of percentages and rounding numbers to two decimal places. The exercise will also reinforce other techniques previously learned, such as selection, iteration, concatenation, numerical operators, the implementation of variables to store user input and system methods to read and write content to/from the console. |
Activity
Simple Solution Advanced Solution Example |
N/A |
Shapes Application (Simple) | ![]() ![]() ![]() ![]() |
50–100 | To complete this exercise the learner is required to combine the techniques of iteration and selection, as used in previous exercises. The solutions for each shape will consist of two loops: an outer loop and an inner loop. Determining how often the sequences in both loops are to be repeated is the key; however, it is more difficult than it looks and may require some ‘trial and error’. |
Activity
Solution Example |
N/A |
The Grade Calculator | ![]() ![]() ![]() ![]() |
50–100 | To complete this exercise the learner is required to look at a new technique: arrays. Arrays enable multiple values to be stored in a single variable, thus reducing the code. The exercise will also reinforce other techniques previously learned, such as selection, iteration, concatenation, numerical operators, the implementation of variables to store user input and system methods to read and write content to/from the console. |
Activity
Solution Example |
Using Arrays |
The Loan Calculator | ![]() ![]() ![]() ![]() ![]() |
50–120 | To complete this exercise the learner is required to write the algorithms to calculate the mortgage rates that are specified in the document; this involves using percentages. The exercise will also reinforce other techniques previously learned, such as selection, iteration, concatenation, numerical operators, the implementation of variables to store user input and system methods to read and write content to/from the console. |
Activity
Solution Example |
N/A |
E-Ticket Machine | ![]() ![]() ![]() ![]() ![]() |
50–120 | To complete this exercise the learner is required to write an algorithm that works out the number of stations between a start and end point, so that a price can be determined; there are numerous ways in which this can be achieved. Printing a receipt to file would make an excellent extension to this task; read the supporting theory for help on how to achieve this. The exercise will reinforce other techniques previously learned, such as selection, iteration, concatenation, numerical operators, the implementation of variables to store user input and system methods to read and write content to/from the console. |
Activity
Solution Example |
File Handling |
Pizza Application | ![]() ![]() ![]() ![]() ![]() |
50–120 | To complete this exercise the learner is required to write a pizza application that allows multiple pizzas to be ordered; this can be easily achieved using arrays and loops. The supporting theory explains how to use loops with arrays. The exercise will reinforce other techniques previously learned, such as selection, iteration, concatenation, numerical operators, the implementation of variables to store user input and system methods to read and write content to/from the console. |
Activity
Solution Example |
Using Arrays |
Boxing Buzzer | ![]() ![]() ![]() ![]() ![]() |
50–120 | To complete this exercise the learner is required to write a boxing buzzer that will act as a timer and count the number of boxing rounds. To complete this exercise, the learner will need to use iteration and a new technique called threading. The exercise will reinforce other techniques previously learned, such as selection, the implementation of variables to store user input and system methods to read and write content to/from the console. |
Activity
Files Solution Example |
Error Handling |
Shapes Application (Advanced) | ![]() ![]() ![]() ![]() ![]() |
50–120 | To complete this exercise the learner is required to combine the techniques of iteration and selection, as used in previous exercises. The solutions for each shape will consist of two loops: an outer loop and an inner loop. Determining how often the sequences in both loops are to be repeated is the key; however, it is more difficult than it looks and may require some ‘trial and error’. This particular exercise includes more advanced shapes than the simple version. |
Activity
Solution Example |
N/A |