Various programming problems, solved or attempted in Python