This page includes links to some programming problems to allow you to practice your programming skills in Python or other programming languages. Many of them are based on the BBC Puzzle for Today and similar website.
You should always try and find the most efficient and most elegant solution to the problems.
The following puzzles were taken from the itasoftware puzzle archive.
Write a program to compute the sum of all the integers between 1 and 1011 both divisible by seven and, when the decimal digits are reversed, are still divisible by seven.
In 1850, Carl Friedrich Gauss and Franz Nauck showed that it is possible to place eight queens on a chessboard such that no queen attacks any other queen. The problem of enumerating the 92 different ways there are to place 8 queens in this manner has become a standard programming example, and people have shown that it can be solved using many different search techniques. Now consider a variant of this problem: you must place an equal number of knights and queens on a chessboard such that no piece attacks any other piece. What is the maximum number of pieces you can so place on the board, and how many different ways can you do it?
An "add-a-gram" is a sequence of words formed by starting with a 3-letter word, adding a letter and rearranging to form a 4-letter word, and so on. For example, here are add-a-grams of the words "CREDENTIALS" and "ANACHRONISM":
ail + s =
sail + n =
nails + e =
aliens + t =
salient + r =
entrails + c =
clarinets + e =
interlaces + d =
CREDENTIALS (length 11)
mar + c =
cram + h =
march + s =
charms + o =
chromas + n =
monarchs + i =
harmonics + a =
maraschino + n =
ANACHRONISM (length 11)
Test your own credentials: given the dictionary found here, what is the longest add-a-gram?