Guide to the worksheets

# Blackjack 1

is designed to be your first exposure to programming. First, the pupil runs the Blackjack program, to understand how the game works. Then they learn: how to navigate around the code that defines up the program, the nature of instructions, and how to recognise the different kinds of instruction. Finally, they are shown how to make some very small changes to the code, which can result in a significant enhancement to the game, once run.

# Blackjack 2

This is designed to introduce the idea of writing new instructions including:

- the nature and purpose of a function
- the nature and purpose of variables and how to define one
- how to change ('set') the value held by a variable
- the nature and purpose of a conditional instruction ('if')
- how to access 'properties' of a value (if any) using 'dot syntax'

All this is done by improving a slightly different version of the Blackjack program that has automated players. To start with the two automated players, have very different strategies - though neither is very effective. Over multiple iterations the pupil gets to modify these strategies and improve them progressively - repeatedly 'leap-frogging' the poorer performing player over the better one.

# Random Walk

is an alternate start point for learning about programming - using turtle graphics. But instead of drawing abstract patterns, you will be using Turtle graphics to conduct a scientific investigation of 'random walks' - which model phenomena in physics, biology, economics, and other areas of study.