Tag: iteration

Standard Form Conversion Algorithm


Standard form (a.k.a. standard index form), is a system of writing numbers which is particularly useful when using either very large or very small numbers. It is based on using powers of 10 to express how big or small a

Vera Molnár’s Artwork revisited using Python


Vera Molnár (born 1924) is a French media artist of Hungarian origin. She is considered to be a pioneer of computer art. Trained as a traditional artist, she began working with computers in 1968, where she began to create algorithmic

Jack and the Beanstalk


In the English fairy tale, Jack and the beanstalk, Jack is a young, poor boy living with his mother and a dairy cow on a farm cottage. The cow’s milk is their only source of income. When the cow stops

Number 2520?


Did you know that 2520 is the smallest number exactly divisible by all integers from 1 to 10. The aim of this challenge is to write a python script to work out this number from its definition. Note that a

Higher or Lower Number Game


For this challenge you will design and write a program to play against the computer. The computer will display a random number between 1 and 100. The user will have to try to guess this number. For each guess the

The missing key


The aim of this challenge is to write a computer program that will take two whole numbers (integers) as input and output the result of multiplying these two numbers together. However, to make this task more challenging, you have to

Pomodoro Timer


The Pomodoro Technique is a time management method that can be used for a wide range of tasks. Many students use this technique to organise their revision time before an exam. This Pomodoro Technique was developed by Francesco Cirillo in

The Honeycomb Challenge


Honeycomb is a structure of hexagonal cavities (cells of wax), made by bees to store honey and eggs. In this challenge we will use a set of iterative algorithms to draw a honeycomb pattern. First, we will create a function

Recursive vs. Iterative Palindrome Check


For this challenge we will investigate two algorithms used to find out if a word is a palindrome or not. The first algorithm will use an iterative approach, the second algorithm will use a recursive approach. Iterative Approach An iterative

Triangular Numbers


A triangular number correspond to the number of dots that would appear in an equilateral triangle when using a basic triangular pattern to build the triangule. The triangular numbers sequence contains all the triangular numbers in order. The first 10