Skip to main content
Skip to main content

Visual to text coding:
Index page

Years 5-6; 7-8

About this course

This lesson sequence provides a bridge between visual coding (eg. Scratch) and General Purpose Programming languages (eg. Python or JavaScript).

Each video builds a simple program in all three ways: Scratch, Python and JavaScript.

This resource is most suitable if:

  • you have never done General Purpose Programming,
  • you benefit from slow-paced, step-by-step video tutorials.


Setting Up

Use these two videos to:

  • set up your programming environment.
  • go through some of the common errors that people fall victim to!
Setting Up
1. Setting Up
Setting up video thumbnail
1a. Gotchas
Gotchas video thumbnail

The Basics

Use these three videos to:

  • learn how to store, concatenate and output data.
  • build a simple application to consolidate knowledge of these skills
The Basics
About concatenation:
Concatenation video thumbnail
About variables:
Variables video thumbnail
About input/output:
Weather application video thumbnail

Lesson 1: Temperature converter

Two/three 45-minute periods

  • Use pseudocode for code design.
  • Introduce variables.
  • Design and code a program to convert temperature units (°C to °F).
  • OPTIONAL: Challenge yourself to build other converters, including currency.
Lesson 1: Temperature converter

Videos in this lesson:

Celsius converter:
Celsius converter video thumbnail

Improving output:
Celsius converter concatenation video thumbnail
Currency converter:
Currency converter video thumbnail

Bitcoin tracker:
Bitcoin tracker video thumbnail
How much Netflix?
How much Netflix? video thumbnail

Go to lesson

Lesson 2: Calculator

Two/three 45-minute periods

  • Introduce branching (decisions).
  • Identify data types.
  • Design and code a text-based calculator.
  • OPTIONAL: Challenge yourself with an ice cream vending interface and a Maths quiz.
Lesson 2: Calculator

Videos in this lesson:

Making decisions:

Control flow video thumbnail
Calculator

Calculator video thumbnail
International Space Station position
International Space Station video thumbnail

Go to lesson

Lesson 3: Heads or Tails

Two/three 45-minute periods

  • Introduce random numbers.
  • Design and code a heads-or-tails game.
  • OPTIONAL: Challenge yourself with a dice roll simulator.
Lesson 3: Heads or Tails

Videos in this lesson:

Heads or tails (intro)
Heads or tails (overview) video thumbnail
Heads or tails (coding)
Heads or tails (scratch, python, javascript) video thumbnail
Dice roll simulator:
Dice roll challenge video thumbnail

Go to lesson

Lesson 4: Paper, scissors, rock

Two/three 45-minute periods

  • Introduce combining of logical operators and
    and or.
  • Design and code a game with complex win conditions.
  • OPTIONAL: Have a go at designing your own Rock-Paper-Scissors-Lizard-Spock program.
Lesson 4: Paper, scissors, rock

Videos in this lesson:

Scissors, Paper, Rock game (overview)
Scissors, Paper, Rock video thumbnail
Scissors, Paper, Rock game (coding)
Scissors, Paper, Rock video thumbnail

Go to lesson

Lesson 5: Password generator

Two/three 45-minute periods

  • Set up pseudocode for code design
  • Introduce Arrays and Lists
  • Design and code a random Password Generator
  • OPTIONAL: Create a random fantasy character, game show challenge and shopping list
Lesson 5: Password generator

Videos in this lesson:

About arrays
Arrays video thumbnail
Password generator (overview)
Password generator video thumbnail
Password generator (code)
Password generator video thumbnail

Go to lesson

Lesson 6: Magic 8 ball

Two/three 45-minute periods

  • Introduce the length property for arrays.
  • Design and code a Magic 8 Ball to advise you.
Lesson 6: Magic 8 ball

Videos in this lesson:

Length property

Lengths video thumbnail
Decision maker and magic 8 ball
Decision maker and magic 8 ball video thumbnail

Go to lesson

Lesson 7: Times tables

Two/three 45-minute periods

  • Introduce iteration (loops).
  • Design and code a times table generator for any number.
Lesson 7: Times tables

Videos in this lesson:

Loops
Loops video thumbnail
Times tables
Times tables video thumbnail

Go to lesson

Lesson 8: Guess the number

Two/three 45-minute periods

  • Learn more about variables and iteration (loops).
  • Design and code a higher/lower game, where the player must guess a secret number between 1 and 20.
Lesson 8: Guess the number

Videos in this lesson:

Guess the number
'Guess the number' video thumbnail
Vowel replacer
Vowel replacer video thumbnail

Go to lesson

Lesson 9: Loops and arrays combined

Two/three 45-minute periods

  • Discover how loops and arrays work together for powerful programs.
  • Build a program to analyse student marks and make useful information.
  • OPTIONAL: Challenge yourself to process new data.
Lesson 9: Loops and arrays combined

Videos in this lesson:

A program to analyse marks
'A program to analyse marks' thumbnail

Go to lesson

Lesson 10: Simple functions

Two/three 45-minute periods

  • Set up and practice using turtle graphics in Scratch, Python and JavaScript.
  • Create functions without parameters.
  • Incorporate loops (iteration) inside a function.
  • Discover how functions help organise code.
  • OPTIONAL: Challenge yourself to draw a cosmic image
Lesson 10: Simple functions

Note: Turtle graphics is an effective context to learn about functions, but examples will also be provided for writing functions outside of the turtle graphics context.

Videos in this lesson:

Simple functions in Scratch

'Simple functions in Scratch' video thumbnail
Simple functions in Python & JavaScript
'Simple functions in Python & JavaScript' video thumbnail

Go to lesson

Lesson 11: Adaptable functions with parameters

Two/three 45-minute periods

  • Create functions that adapt their behaviour thanks to parameters.
  • Observe how functions reduce repetition in code.
  • OPTIONAL: Challenge yourself to generate a size chart.
Lesson 11: Adaptable functions with parameters

Videos in this lesson:

Adaptable functions with parameters
'Adaptable functions with parameters' video thumbnail
Reducing repetitive code

'Reducing repetitive code' video thumbnail

Go to lesson

Lesson 12: Functions that give back (return values)

Two/three 45-minute periods

  • Identify and describe some of the in-built functions you have been already been using.
  • Create functions with return values. They give back an answer, rather than just perform an action.
  • Observe how functions are used in Graphical User Interfaces, triggered by user inputs.
  • OPTIONAL: Challenge yourself to write a small battle game by building a library of functions.
Lesson 12: Functions that give back

Videos in this lesson:

Functions with return values
'Functions with return values' video thumbnail

Go to lesson

Next steps

We are currently working on a follow-up course to develop Graphical User Interfaces in JavaScript and Python. Stay tuned!

In the meantime, here are some recommended options to continue with General Purpose Programming:

  • Coding a sentimental chatbot in Python

    A series of video tutorials to build a chatbot in Python that incorporates AI (Natural Language Processing). Coding difficulty is appropriate for students who have worked through the Visual to Text Coding lesson sequence.

  • Python and JavaScript DT Challenges from the Australian Computing Academy

    Hosted on the Grok Learning platform, these self-paced coding courses are free for Australian students in Years 3-8.

  • App Lab at code.org

    Use JavaScript* via blocks or text to create apps. The App Lab is also incorporated into free courses at code.org.

  • The MakeCode platform is a set of online environments supporting both block coding and general purpose programming.

    MakeCode for micro:bit is an online environment for writing code for the popular micro:bit device. It supports both JavaScript* and Python. A simulator allows testing of code without the physical device, though the device is recommended. Lessons and project ideas are available on the official site. Physical Tech from Go to WHOA! is also suggested.

    MakeCode Arcade is an online environment for writing code for MakeCode Arcade devices, which function like small handheld game consoles. It supports JavaScript*. A simulator allows testing of code without the physical device. Lessons and project ideas are available on the official site.

    MakeCode for Minecraft is an online environment for writing code to run in Minecraft. It supports both JavaScript* and Python.

    * This is actually Microsoft's variant TypeScript.

    It is linguistically very similar to JavaScript.