## Python Challenge – 7 Puzzle

Here’s a fun little puzzle for you, which lends itself well to a Python coding solution. Find a two-digit positive integer that becomes 7 times smaller when its leftmost digit is removed....

Here’s a fun little puzzle for you, which lends itself well to a Python coding solution. Find a two-digit positive integer that becomes 7 times smaller when its leftmost digit is removed....

Writing robust code is always a good idea, but is particularly important for mission critical contexts, such as where safety is an issue. There are several historical examples of where faulty code...

In this article we are going to learn how to implement Selection Sort with Python. Selection Sort is a simple and intuitive sorting algorithm. It can be performed using an auxiliary array...

If a picture is worth 1000 words, an animation is worth even more! Fully understanding an algorithm can be hard, and it is helpful to be able to reason about it in...

Understanding all the details of how an algorithm works can be challenging, and it is helpful to be able to perceive what is happening from multiple angles. One particularly useful tool to...

The efficiency of algorithms is important. Imagine a program that took centuries to calculate the solution to a problem (like Deep Thought from the Hitchhiker’s Guide to the Galaxy), or needed more...

The change making problem has become something of a classic due to what it can show us about different approaches to algorithmic problem solving. In this article we will look at the...

The Collatz Conjecture is an unsolved problem in Mathematics which lends itself nicely to exploration with Python. The idea is simple: Pick a positive whole number. If it’s odd, multiply it by...

In this Python coding challenge your goal is to implement the modulo operator (%) for yourself, without using division or the % operator itself. We’ll only consider positive integers here, although by...

In this article, we are going to explore the Gambler’s Fallacy with Python and p5.js by simulating sequences of coin flips. If I flip a coin 4 times, and the probability of...

© 2019 Compucademy™ All Rights Reserved. Terms and Conditions