Python Venn Diagram Example 1

In this article we are going to look at how to create Venn Diagrams with Python. Venn Diagrams are a great invention and are a really handy way to reason about sets. …


I’ve been enjoying reading A Programmer’s Introduction to Mathematics by Jeremy Kun recently. After the introduction, the first main topic it covers is a neat trick for sharing secrets (encrypting messages) so that they can be decoded using polynomial functions.

Being a firm believer in learning by doing, I immediately…


In this post we are going to use Python to explore the story of the Baltimore Stockbroker.

If you were in the fortunate position to have some money to invest and you received a series of letters through your door from a stock broker in Baltimore claiming to have a…


In this article we are going to learn how to do some basic sentiment analysis with Python, using a wordlist-based approach and the afinn package.

First, you will need to install the package:

pip install afinn

or

pip3 install afinn on Mac/Linux

You will also need to install the following…


In this post we are going to explore conditional probability with Python. Here’s a fun and potentially tricksome question about probabilities:

In a family with two children, what is the probability that, if at least one of the children is a girl, both children are girls?

First of all let’s…


In this article we are going to use Python to test whether a coin is fair. We will do this by making use of the statsmodels package to perform a hypothesis test.

The problems we will be solving will be of the form:

I flipped a coin 100 times and…


Copy/pasting the code breaks the formatting (at least removes blank lines). I know this is a platform problem, but maybe you could help by providing a link to a gist or some such?


In this article we are going to learn about Simpson’s Paradox and explore it with Python programming.

Simpson’s Paradox is where data appears to tell a different story when treated as a whole than when its component parts are considered. There are some famous cases of this paradox which you…


The Binary Search Algorithm is fundamental in Computer Science. It is a very clever algorithm which reduces the time needed to search for items in large datasets dramatically compared to less efficient approaches.

It is important to note that in order to use binary search, your data must be sorted


Python Fizz Buzz Coding Challenge

Fizz Buzz is a classic coding challenge based on a game played at school in Maths lessons.

Fizz Buzz is a game for two or more players. Take it in turns to count aloud from 1 to 50, but each time you are going to say a multiple of 3…

Compucademy

Computer Science Education for the Next Generation. Teaching, Training and Resources.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store