Python Simple Dice Game

Here’s a simple program in Python that demonstrates some important fundamental concepts in computer programming. The program simulates two players taking it in turns to roll a 6-sided dice, and keeps track...

Python Programming Challenge – Validate ISBN-10 Number

ISBN Numbers, or International Standard Book Numbers are commercial numeric book identifiers which are used to uniquely identify a publication. There are two types of ISBN numbers – ISBN-10 and ISBN-13. Validation...

Python Programming Challenge – Maximum Value in List

Here’s a python programming challenge for you to help you develop your problem solving and algorithmic thinking skills. Find the position of the maximum value in a Python list of integers. Some...

Python Coding Challenge – Sum of Squares

Here’ a fun Python challenge involving just a bit of mathematical know-how: Write a function that takes an argument n and prints a pair of natural numbers x, y such that x²...

The Modulo Operator in Python

The modulo operator is used in Python programming when you need to find the remainder of integer division. It comes up in many important algorithms, and is represented by the symbol %....

Python Dictionaries

Some Python developers would say that there are two fundamental data structures which form the basis of the language: lists and dictionaries. Whether or not that is true, they are both certainly...

Python append() and extend() List Methods

In this article we are going to take a look at two important Python list methods – append() and extend(). Both are very useful, but each serves a different purpose. Python List...

Python Turtle Graphics – Drawing with Stamps

Python Turtle Graphics stamps are awesome. They are not that well known, and learner python programmers often do things in a more complicated way than they need to as a result. Take...

A Bit of Fun with Python

Every now and then I look at a syllabus or textbook for GCSE Computer Science and it strikes me how much more interesting the content could be. Fun with Python for Computer...

Python Nested FOR Loops

Why do I Need Nested Loops in Python? Nested loops are a very important concept in Python programming and Computer Science, are used in many algorithms. For example sorting algorithms such as...