Alan Richmond

Eight Queens Puzzle – Six Lines

8 Queens

Eight Queens Puzzle’ is a classic chess puzzle, where you are challenged to place 8 queens, of the same colour, onto a chess board, such that no queen attacks any other queen. So, none of them may share a …

Ramanujan’s 129th Birthday


Someone on Reddit pointed out that today (Dec 22nd) is Ramanujan’s 129th birthday. One of the commenters further pointed out that 129 is the sum of the first 10 primes, and the smallest number that is the sum of three squares …

Easy AI with Python 3

easy ai

Survey several basic AI techniques implemented with short, open-source Python code recipes. Appropriate for educators and programmers who want to experiment with AI and apply the recipes to their own problem domains. For each technique, learn the basic operating principle,

Solar System Scope

Solar System Scope

Online 3D simulation of the Solar System and night sky in real time – the Sun, planets, dwarf planets, comets, stars and constellations. The Model consists of 3 main Views (Heliocentric, Geocentric and Panaromatic), including:
• Precise Positions of all …

Have we already seen this number? (deja vu again)

I had a phone interview for a Python job the other day. It started out really well, he was very impressed with my CV and called me a ‘rocket scientist’. But then we got down to the technical questions and …

Hello World 2, in Python 3

hello world

Hello World is the famous minimal introductory program for many programming languages. But as soon as it’s served its purpose, it’s discarded in the dust of history for more exciting things, such as data types or expressions… This is politically …

Book Review: Coloring the Universe

Coloring the Universe

Coloring the Universe: An Insider’s Look at Making Spectacular Images of Space by Dr. Travis Rector, Kimberly Arcand & Megan Watzke. This is a coffee-table astronomy book with a difference: the processing behind the beautiful astronomical images we’re now …

Barcodes in the Stars: Stellar Spectroscopy

Fraunhofer Lines in the Sun's Spectrum

What are the Sun and Stars Made of?

Scientists tell us that the stars (e.g. our Sun) are made mostly of hydrogen (72%) and some helium (26%) and a little bit of some (65) other elements such as oxygen, …

World Science U: Knowledge for Everyone

World Science U

Whether you are a high school student, science major in college or a lifelong learner, World Science U is where you can explore the wonders of Science guided by leading researchers an educators. World Science U provides a unique educational …

General Puzzles

Rubik's Cube

A man who lives on the tenth floor takes the lift down to the first floor every morning and goes to work. In the evening, when he comes back; on a rainy day, or if there are other people in …

Logic Puzzles

By Cmglee (Own work) [CC BY-SA 3.0 (], via Wikimedia Commons
Logic, The Anatomy of Thought

Knaves and Knights

An island is inhabited by two classes of people: knights, who make only true statements, and knaves, who make only false statements. Three inhabitants are conversing. Alfred says, “All of us are knaves.” Bert says, …

Lateral Thinking Puzzles

Rodin's Thinker

Be prepared to think outside the box for these classic lateral thinking puzzles. Enjoy!

Three Switches and Three Bulbs

Three switches outside a windowless room are connected to three light bulbs inside the room. How can you determine which switch …

Does ‘Almost Infinite’ Mean Anything, Really?


It’s a common enough phrase, and I think most of us have no trouble understanding that the speaker or writer is referring to a quantity of something that is mind-bogglingly huge. Infinity is a slippery concept; you may suppose that …

Number guessing game

The number guessing game incorporates several simple but important elements of elementary programming and is a good candidate for an introductory programming example.

If you’ve seen any programming course, you’ve probably seen the “Hello World” program. In Python it’s: …