How to prepare
The early questions will require you to be familiar with Blockly. A tutorial system that also includes some engaging challenges can be found here: blockly-games.appspot.com. Focus especially on the Maze, Turtle and Movie sections.
Unless you are in the Junior age category, you will be required to be familiar with a modern programming language for solving Section 3 problems. Suitable tutorials can be found here: Programming
You will also need to be familiar with the sections required for your age group in the Syllabus
Special tutorials that address this Challenge specifically can be found below
A carefully structured Python tutorial aimed at able beginner programmers can be found here: computer science circles. It is possible for you, and any other students from your school to register on this site and then assign your teacher (or even a student) as your mentor. This person will recieve any requests for help you might make.
Example 1: Logo Maker:
A new country has been founded from five small, friendly countries. A program is required that can be used to create its new logo. Using only the blocks supplied, write a program that draws the shape shown.
Example 2: Entwined Sequences:
Examine the series of numbers shown below:
2 1 4 3 8 5 16 7 32 9 64 ...
2 is the 1st number in the series, 1 is the 2nd number in the series, etc.
Using any programming language, create a program that finds the sum of the first 10,000 numbers.
Submit the first 10 digits of the sum as your answer.
Archived auto-marking Challenges are available to everyone, throughout the year without the need to login. Please visit here to have a go: Challenge Archive
Below are answer booklets for recent TCS Oxford Computing Challenges. These include answers (in Python and Blockly), explanations and information explaining how the tasks are related to Computer Science.
This section provides some tutorials that are specific to solving the tasks found in the TCS Oxford Computing Challenges.
1. Blockly Coding Tasks
This type of task is very flexible: Task authors can set problems where a variety of solutions can be given credit for producing the correct answer. These tasks use Function blocks and take this form:
How to answer Blockly Coding tasks in the TCS OCC Challenges:
Write all of your code in the function. There is no need to write any code outside of the function. The task author will have provided the necessary parameters and some suitable test data to pass to the function. The Execute block passes these values to the function block as it calls it. (It is OK to change these values to provide yourself with new tests.)
It is not necessary to understand how to create functions to answer these tasks. Your code needs to form a mini-program inside the function block provided. However, there are a few things that you do need to know:
- When a program is executed, functions are ignored until called by the Execute block.
- These functions need to be passed input values which are given identifier names. You will find these input variable blocks in the Variable blocks menu.
- The functions in these sort of tasks return a value which is output. This is used by the marking program.
- Your program needs to produce the correct answer for other input values as well as any test data provided.
2. Blockly Turtle Tasks
Coming soon ...
3. Blockly Maze Tasks
Coming soon ...
4. Blockly Picture Tasks
Coming soon ...
5. Blockly Movie Tasks
The key to understanding these tasks is to realise that the code you write is executed 100 times in a movie time loop to create an animation. This means that in some instances your code might not complete in each frame!
The process of drawing each movie frame is like this:
1. Remove old objects (shapes and lines).
2. Execute the code blocks in the workspace
3. Draw the objects onto the canvas.
The main blocks:
returns the frame integer from 0 to 100.
creates a shape with the parameters shown.
Add shape: name me needs to be unique for each shape object added or weird things will happen!
number of sides: 3=triangle, 4=square ... 9=nonagon, all other integers create a circle
colour: sets the colour to that shown in the colour picker
radius: sets the radius of the containing circle in the same units as the scale on the canvas
position X: sets the x coordinate of the centre of the containing circle in the same units as the scale on the canvas. Note that the top left corner of the canvas is (0,0)
position Y: sets the x coordinate of the centre of the containing circle in the same units as the scale on the canvas.
6. Blockly Image Tasks
Coming soon ...