Skip to content

    Python Peak

    Year 6 First Steps in Python

    Read real Python code: print, variables, input, if–else and for loops — the same ideas as blocks, written as text.

    • Ages 10–12
    • 3 quests
    • Beginner → Getting stronger → Challenge

    Python is one of the most widely used programming languages in the world, and its code reads almost like English. Everything Year 6 coders already know from blocks — variables, loops and decisions — is here, just typed as text.

    What your child will learn

    • Know that print() shows something on the screen
    • Store values in variables with = and use them in sums
    • Read an if–else decision and a for loop
    • Know that indentation shows which lines belong to an if or a loop

    Blocks to text

    “set score to 5” becomes score = 5. “say score” becomes print(score). “repeat 3” becomes for i in range(3): — and the lines to repeat are indented underneath, just as blocks sit inside a loop.

    Small details matter

    Text languages are strict. Text needs speech marks: "Hello". One = stores a value, while == asks whether two things are equal. Capital letters count, so Score and score are different variables.

    Example questions

    Here are a few questions like the ones in the first quest. Can you solve them?

    1. 1. In Python, what does “score = 10” do?

      • Prints the number 10
      • Stores 10 in a variable called score
      • Asks whether score is 10
      • Adds 10 to score
      Show answer

      Answer: Stores 10 in a variable called score. A single = puts a value into a variable.

    2. 2. What does this program show?

      • Hello
      • print
      • "Hello"
      • Nothing
      Show answer

      Answer: Hello. print() shows the text inside the speech marks, without the marks.

    3. 3. What does this program show?

      • 52
      • x + 2
      • 7
      • 5
      Show answer

      Answer: 7. x starts at 5 and then becomes 5 + 2 = 7.

    4. 4. Match each line of Python to what it prints.

      • print("2" + "3")
      • print(4 * 2)
      • print("Hi")
      • print(2 + 3)
      • 5
      • 8
      • 23
      • Hi
      Show answer

      Answer: print("2" + "3") → 23 · print("Hi") → Hi · print(2 + 3) → 5 · print(4 * 2) → 8. Numbers add up; text in quotes is joined together.

    Tips for grown-ups

    • Try these programs in a free online Python editor and change the numbers.
    • Read a program aloud, line by line, saying what each variable holds.
    • Break a program on purpose — remove a bracket — and read the error message together.