Heads or tails

In this lesson we show how to transition from a visual based programming language to using a text-based programming language using the example of a heads or tails coin toss application.

Additional details

Year band(s) 5-6, 7-8
Content type Lesson ideas
Format Web page
Core and overarching concepts Abstraction, Algorithms, Implementation (programming)
Australian Curriculum Digital Technologies code(s)

Design algorithms involving multiple alternatives (branching) and iteration


Design algorithms involving nested control structures and represent them using flowcharts and pseudocode


Trace algorithms to predict output for a given input and to identify errors

Keywords Algorithms, Branching, User input, JavaScript, Text based programming, General purpose programming, Code, Code editor, W3Schools, Random, Variables, String, Transition, Scratch, Visual programming, Repetition



Creative Commons Attribution 4.0, unless otherwise indicated.