Code the blocks

A free and interactive playground for learning how to code

Start free tutorial

Learn how to code in Python for free!

The CTB tutorials teach you how to code in Python using an interactive approach. As you progress through the tutorials, you'll be able to construct more intricate structures using blocks. Take a look at the many 3D structures you could end up creating.

Start free tutorial
Slide 1 of 5

The simplest structure

This is the simplest structure you can create in CTB and it's called a "block". It is the foundation of everything else you're going to build here.

Visit lesson

Combine blocks to create structures

The individual blocks can be combined into more intricate structures. This is an example of a very simple structure.

Visit lesson

Blocks can also be colored

Blue blocks are a bit boring! So feel free to color your blocks. The lessons in the tutorial will teach you how to play around with colors and create visually appealing 3D structures.

Visit lesson

A colored ring

The tutorial will teach you to create structures like this colored ring. Creating such structures involves both programming skills and an understanding of geometry. Both will be covered in the lessons here.

Visit lesson

A double helix

A small number of modifications to the ring code can turn it into a double (or even a triple) helix. The lessons in this tutorial will go over these modifications. These lessons will not only introduce you to various software concepts, but also give you an intuitive understanding of geometry.

Visit lesson

Play around in the sandbox

If you just want to mess around with the platform, feel free to experiment in the sandbox.

Play in sandbox