While looking for sites to learn Python, I came across a fun little site that teaches the basics of Python by positioning 3 dimensional blocks to create various structures. The site can be found at: CodeTheBlocks.com. Some lessons give you a problem to solve at the end. I wanted to share some of the solutions I came up with.

Problem:

Create a mirror image of the color-bar:

Solution:

Creating a color bar and a mirrored version.

Problem:

Create a colorful ring using the color list and the modulo operator.

Solution:

Creating a multicolored ring using modulo and a single loop.

Problem:

Create a double helix.

Solution:

Creating a quad-helix.

Ok, so that last one ended up being a quad helix, I was having fun…

Leave a Reply

Your email address will not be published. Required fields are marked *