Author: Administrator

Dice Score Frequency Analysis

two-dice

In this challenge we will use a Python algorithm to perform a frequency analysis of the score obtained when throwing a set of two dice. Frequency analysis using 1 dice Let’s consider a single 6-sided dice. When using single dice,

Random Odd and Even Numbers

random-numbers

In this challenge we will focus on using the random library to generate random numbers in Python. The randint() function is used to generate a random integer (whole number) within a given range. The above code would generate a random

Multi-threading in Python

multi-threading

In this blog post we will investigate how to implement concurrent processing in a Python program to allow multiple processes to be executed concurrently. To do so will create and run multiple threads in our program and will need to

The Legend of Pachacuti’s Golden Shield

golden-shield

A few weeks ago, a group of British trekkers stumbled upon the remains of what is believed to be an undiscovered Inca temple in the middle of the Peruvian rainforest. One of their most unexplained discoveries is a collection of

The School Lockers Puzzle

school-lockers-puzzle

On the first day of school, the principal of Locker High school decides to conduct an experiment. The school has exactly 1,000 students and 1,000 lockers all lined up alongside the main corridor of the school. The principal asks the

2D Dice Grid Scoring Algorithm

2D-dice-grid

This challenge is based on a 4×4 grid of dice (16 dice in total). Each game starts by shaking the grid to generate a new grid of 16 values. All dice are 6-sided dice, generating random values between 1 and

Diagonal Difference Calculator

diagonal-difference-square-matrix

Let’s consider a square matrix of n x n. (n columns and n rows). The diagonal difference of a square matrix is the absolute difference between the sums of its diagonal. Let’s look at an example based on the following

Wind Speed Conversions and the Beaufort Scale

weather-vane

Before going to sea, any sailor should check the marine weather forecast to check on different aspects of the weather including the direction and strength of the wind (wind speed). The wind speed can be measured using different units such

Circle Geometry Functions

circle-segment-area

In this challenge we will create a library of functions to apply the different formulas based on the geometry of circles. For each function, you will need to design the algorithm using either Pseudo-code or a flowchart, implement the function

Tutankhamun’s Papyrus

The mask of Tutankhamun

The historical era of ancient Egypt spreads over more than 30 centuries during which different pharaoh’s ruled Egypt. One of the most famous pharaoh, Tutankhamun commonly referred to as King Tut ruled from 1334 to 1325 BC. He was the