its been more than two years since I started the Compucademy blog, and there are now a significant number of articles here, mostly on the topics of Python programming and Computer Science. In order to make it easier for you to find what you are looking for, or to pique your interest in something you didn’t know you were looking for, I’ve created this page which lists the articles on this blog in categories. Some articles appear in more than one category, so there will be some repetition, as my goal here is to be thorough more than concise.
Python Beginners
These articles are suitable for newcomers to Python or those with some basic knowledge but who are still near the start of their learning journey.
- Python Naming Conventions: Best Practices and Examples - Python, known for its readability and simplicity, has a set of naming conventions that help maintain consistency and clarity in… ...
- Working with Uppercase and Lowercase in Python - Python provides several string manipulation methods to work with uppercase and lowercase characters. In this article, we'll delve into four… ...
- Formatting Output with Python F-Strings - In Python, string formatting is a crucial aspect of working with text and data representation. While the .format() method has… ...
- Understanding Conditional Statements in Python - Python allows us to make decisions in our code using conditional statements. These statements help our programs make choices and… ...
- Exploring Python Online Coding Platforms - Python, the famous accessible and versatile programming language, has gained immense popularity for its readability and ease of use. If… ...
- Exploring Byte to GB Conversions Using Python - In the realm of computer science, converting bytes to gigabytes (GB) plays an important role, as it directly relates to… ...
- ASCII to Binary Conversion in Python - ASCII, which stands for the American Standard Code for Information Interchange, became a communication standard in 1967 and has since… ...
- Alternatives to “do while” loops in Python - In Python, the "do while" loop, commonly found in other programming languages, is not explicitly available. However, Python provides alternative… ...
- How to Check Python Version: A Comprehensive Guide - Python is a versatile and widely-used programming language with a vibrant ecosystem of libraries and frameworks. As Python evolves, it's… ...
- Working with Dates in Python - Dates are an essential aspect of programming, and Python provides a powerful library, datetime, to manipulate dates and times. In… ...
- Calculating Averages in Python - When dealing with data analysis, understanding the central tendency of a dataset is crucial for gaining meaningful insights. Python provides… ...
- The Myth of “var” in Python: Understanding Scope and Declaration - Programming languages often carry distinct features that set them apart and influence how developers write and structure their code. In… ...
- Exploring the list.count() Method in Python - Python's versatility lies in its extensive library of built-in methods that simplify and enhance coding tasks. One such method is… ...
- Python Split String into List – A Comprehensive Guide with Examples - In Python, the split() method is a powerful function that allows you to break down a string into a list… ...
- Mastering Python List Average: A Simple Guide - A Practical Guide to Calculating List Averages in Python Python offers remarkable capabilities when dealing with lists and calculating averages.… ...
- Mastering Python: Learn to Iterate Through Lists - Python has cemented its place in the world of programming languages with its simple yet powerful syntax that is agile,… ...
- Easy Steps to Update Python Successfully - Grasping the world of Python programming could be an uphill task for some, particularly when it comes to understanding the… ...
- Abstraction in Programming: A Beginner’s Guide - Abstraction is a powerful concept that helps us understand complex ideas by focusing on the essential aspects and ignoring unnecessary… ...
- A Comprehensive Guide to Python Variable Names - Python is a versatile and widely-used programming language known for its readability and simplicity. One crucial aspect of writing clean… ...
- A Guide to all() and any() in Python - This article will discuss the all() and any() functions in Python and how to use them in your code. In… ...
- Modifying Python Lists inside a for Loop - There is a common misconception that are not supposed to modify a Python list inside a for loop. However, that… ...
- A Beginner’s Guide to Python Lists - Python lists often perform the function of arrays in other languages. What is a Python List? Lists are one of… ...
- A Beginner’s guide to Exceptions in Python - An exception is an error that occurs during the execution of a program. This article will discuss how to handle… ...
- Calculating the Area and Perimeter of Shapes using Python - I've argued for a long time that Computer Science and Mathematics teaching could and should be much more integrated. For… ...
- Python Off-by-One Errors - Off-by-one errors are a type of logic error in Python programming, which are surprisingly common and can easily trip you… ...
- Python Adjacent Indices Challenge - In this article we will look at how to use Python to determine whether two indices in a list are… ...
- Practical Python String Methods - In this article we will look at some practical uses of Python string methods to manipulate text. Much of the… ...
- Python books for beginners - There is no doubt that the best way to learn to program is to practice. However, this is not enough.… ...
- Installing Python Packages - One of the things which makes Python awesome is the quality and quantity of open source packages available to extend… ...
- 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… ...
- PYTHON USER INPUT - User input is one of the things which makes Python programming powerful and interesting, as it provides interactivity. This article… ...
- TRIANGLE NUMBERS WITH PYTHON - This post explores some different ways of generating the famous Triangle Numbers with Python. Before reading on, have a go… ...
- PYTHON FUNCTIONS - Functions are a very important aspect of Python programming. They provide a way to structure your code meaningfully and also… ...
- Python Loops - The ability to repeat tasks many times in rapid succession is one of the things which makes computers so useful.… ...
- Why Learn Python? - Why should you learn Python? There is a lot of talk about Python these days. It has become an extremely… ...
- Python Debugging - Sometimes when debugging Python code, it is useful to be able to see the values of the variables at each… ...
- Python Coding Challenge – Modulo Operator - In this Python coding challenge your goal is to implement the modulo operator (%) for yourself, without using division or… ...
- Drawing Circles with Python Turtle Graphics - In this lesson we are going to learn how to draw circles with Python Turtle Graphics. We will then modify… ...
- 100 Doors Python Coding Challenge - In this lesson we are going to look at a fun coding challenge in Python called "100 Doors". It's a… ...
- Fizz Buzz Coding Challenge in Python - Fizz Buzz is a classic coding challenge based on a game played at school in Maths lessons. Fizz Buzz is… ...
Python Strings
Strings are one of the fundamental data structures in computing, consisting of sequences of characters. Learn about Python strings with these articles.
- Exploring the Power of Regular Expressions with Python’s re Library - Regular expressions, commonly referred to as regex, are a powerful tool for searching, manipulating, and validating text patterns in strings.… ...
- Formatting Output with Python F-Strings - In Python, string formatting is a crucial aspect of working with text and data representation. While the .format() method has… ...
- ASCII to Binary Conversion in Python - ASCII, which stands for the American Standard Code for Information Interchange, became a communication standard in 1967 and has since… ...
- Python Split String into List – A Comprehensive Guide with Examples - In Python, the split() method is a powerful function that allows you to break down a string into a list… ...
- Python Anagrams Challenge - Checking whether two strings are anagrams of each other is a fairly common coding challenge or kata. At a local… ...
- Python Coding Challenge – Duck Duck Goose - Here's a fun Python coding challenge that can be adapted to different levels of ability. Remember the game Duck Duck… ...
- Practical Python String Methods - In this article we will look at some practical uses of Python string methods to manipulate text. Much of the… ...
- 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… ...
- PYTHON USER INPUT - User input is one of the things which makes Python programming powerful and interesting, as it provides interactivity. This article… ...
- PYTHON FUNCTIONS - Functions are a very important aspect of Python programming. They provide a way to structure your code meaningfully and also… ...
- Python Loops - The ability to repeat tasks many times in rapid succession is one of the things which makes computers so useful.… ...
- Python Debugging - Sometimes when debugging Python code, it is useful to be able to see the values of the variables at each… ...
- Automate The Boring Stuff With Python – Book Review - Automate The Boring Stuff With Python by Al Sweigart is a great book that will show you how to perform… ...
- Number Placement Puzzle with Python - This post is about a fun puzzle called the number placement puzzle. I have provided an interactive console program that… ...
- Morse Code with Python - In this article we will learn how to use Python programming to convert messages from English to Morse Code and… ...
- Python Venn Diagrams - In this article we are going to look at how to create Venn Diagrams with Python. Venn Diagrams are a… ...
- Sentiment Analysis with Python - In this article we are going to learn how to do some basic sentiment analysis with Python, using a wordlist-based… ...
- Descriptive Statistics for World GDP per Capita with Python - The only way to gain proficiency in working with data is through experience. Theory can be important, but unless you… ...
- Practical Data Science with Python – Selecting Data from a DataFrame - The task: Emulate SQL SELECT with a pandas dataframe E.g. SELECT * FROM table WHERE column_name = some_value; The code… ...
- Getting Unstuck in an Exam - This article will help you to achieve your full potential in exams for any subject. Have you ever been in… ...
- 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… ...
- User Login with Python and SQLite - In this lesson you will learn how to create a basic login script with Python and SQLite. SQLite is ideal… ...
- Introduction to HackerRank for Python Programmers - HackerRank is a site where you can supercharge your Python programming skills, master data structures and algorithms, and stand out… ...
- 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.… ...
- The Stack Data Structure in Python - The stack is a wonderfully simple data structure which despite its simplicity makes many powerful algorithms possible. Some of the… ...
- Python Programming – List Mutation - A Surprising Feature of Python Lists What do you expect the output of the following Python code to be? def… ...
- Colourful Formatted Tables in Python - This post is written for readers with different levels of experience with Python programming and also with Mathematics. Depending on… ...
- Python Bitwise Operators - Bitwise operators and bit manipulation are like recursion in that they are both topics that are fundamental to computing, yet… ...
- The Babylonian Square Root Algorithm in Python - Developing your algorithmic thinking skills is a great idea whatever your programming goals are. As well as making you a… ...
- Python Dictionaries - Some Python developers would say that there are two fundamental data structures which form the basis of the language: lists… ...
- Python Programming Challenge – Intervals of Consecutive Characters - Python Programming Challenge - Intervals of Consecutive Characters Here's a fun Python programming challenge: Write a function which takes a… ...
- Python Sets and a River Crossing Puzzle - Have you heard of the puzzle about the farmer, the wolf, the goat and the cabbage? You can play it… ...
- We Need to Talk About Pseudocode - Pseudocode for Computer Science GCSE and A Level Pseudocode for Computer Science GCSE and A Level is supposed to provide… ...
- Eight Queens Puzzle in Python - The Eight Queens Puzzle is a classic problem whose goal is to place 8 queens on an 8x8 chessboard in… ...
- Ultimate Guide to Free Python Resources for Beginners - Learning to program with Python is both fun and challenging. For some, it could mark the beginning of a life-long… ...
- SQLite with Python for Computer Science GCSE and A Level - In this article we will learn how to use the SQLite database management system with Python for GCSE and A… ...
- ASCII ART - ASCII character encoding is essential knowledge for Computer Science. It is basically a set of values which represent text characters,… ...
- Cambridge A Level Computer Science Trace Tables Exam-Style Question - The Cambridge International AS and A Level Computer Science Coursebook is generally a fantastic resource, covering the entire 9608 syllabus… ...
Python Lists
Lists are a powerful and versatile data structure in Python which are used in many contexts. It is important to be familiar with Python lists and the operations which can be performed on them.
- Copying Lists in Python - When working with lists in Python, it's essential to understand how copying lists works, as it can impact your program's… ...
- Exploring the list.count() Method in Python - Python's versatility lies in its extensive library of built-in methods that simplify and enhance coding tasks. One such method is… ...
- Python Split String into List – A Comprehensive Guide with Examples - In Python, the split() method is a powerful function that allows you to break down a string into a list… ...
- Mastering Python: Learn to Iterate Through Lists - Python has cemented its place in the world of programming languages with its simple yet powerful syntax that is agile,… ...
- A Guide to all() and any() in Python - This article will discuss the all() and any() functions in Python and how to use them in your code. In… ...
- Modifying Python Lists inside a for Loop - There is a common misconception that are not supposed to modify a Python list inside a for loop. However, that… ...
- A Beginner’s Guide to Python Lists - Python lists often perform the function of arrays in other languages. What is a Python List? Lists are one of… ...
- Python Off-by-One Errors - Off-by-one errors are a type of logic error in Python programming, which are surprisingly common and can easily trip you… ...
- Working with CSV Files in Python - CSV, or comma-separated values, is a simple file format for storing tabular data. It's a popular format for data interchange,… ...
- Python Adjacent Indices Challenge - In this article we will look at how to use Python to determine whether two indices in a list are… ...
- Python Anagrams Challenge - Checking whether two strings are anagrams of each other is a fairly common coding challenge or kata. At a local… ...
- Python Coding Challenge – Duck Duck Goose - Here's a fun Python coding challenge that can be adapted to different levels of ability. Remember the game Duck Duck… ...
- Power Sets with Python - A power set is the set of all possible subsets of a set. For example, if we have a set… ...
- 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… ...
- PYTHON LOOP INVARIANTS - Writing robust code is always a good idea, but is particularly important for mission critical contexts, such as where safety… ...
- TRIANGLE NUMBERS WITH PYTHON - This post explores some different ways of generating the famous Triangle Numbers with Python. Before reading on, have a go… ...
- Random Numbers with Python - Random numbers are very important in computing. Whenever you need to simulate something in the real world where the outcome… ...
- Python Loops - The ability to repeat tasks many times in rapid succession is one of the things which makes computers so useful.… ...
- Selection Sort with Python - In this article we are going to learn how to implement Selection Sort with Python. Selection Sort is a simple… ...
- How to Trace Python Algorithms with a Visualisation Tool - Understanding all the details of how an algorithm works can be challenging, and it is helpful to be able to… ...
- Number Placement Puzzle with Python - This post is about a fun puzzle called the number placement puzzle. I have provided an interactive console program that… ...
- Morse Code with Python - In this article we will learn how to use Python programming to convert messages from English to Morse Code and… ...
- Plotting Polynomials with Python - I've been enjoying reading A Programmer's Introduction to Mathematics by Jeremy Kun recently. After the introduction, the first main topic… ...
- Ransom Note HackerRank Challenge in Python - Image courtesy of Sheila Sund from Salem, United States, CC BY 2.0, via Wikimedia Commons. This Python programming challenge is… ...
- 100 Doors Python Coding Challenge - In this lesson we are going to look at a fun coding challenge in Python called "100 Doors". It's a… ...
- Python Programming Challenge – Counting Pairs - Here's a fun algorithmic challenge for you. Given a list of integers, write a function to find the total number… ...
- The Stack Data Structure in Python - The stack is a wonderfully simple data structure which despite its simplicity makes many powerful algorithms possible. Some of the… ...
- Python Programming – List Mutation - A Surprising Feature of Python Lists What do you expect the output of the following Python code to be? def… ...
- Python Programming Two Sum Interview Problem - This article is about a classic challenge that is often given in Python coding interviews. There are several different approaches… ...
- 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… ...
- Python Memoization - Improving the efficiency of Python Programs Using Memoization Some of you may be familiar with the Fibonacci sequence, which is… ...
- 2-Dimensional Lists in Python - 2-dimensional lists are an extremely important data structure in Python programming, with many applications. They can be very confusing to… ...
- 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().… ...
- Python Programming Challenge – Intervals of Consecutive Characters - Python Programming Challenge - Intervals of Consecutive Characters Here's a fun Python programming challenge: Write a function which takes a… ...
- A Key Distinction for Better Understanding of Computer Science GCSE and A Level - Do you mean the thing or the container for the thing? In this article I want to discuss a key… ...
- Learning Bubble Sort for Computer Science GCSE and A Level - They say a picture is worth a thousand words, and that is probably true, IF you are ready to understand… ...
- Eight Queens Puzzle in Python - The Eight Queens Puzzle is a classic problem whose goal is to place 8 queens on an 8x8 chessboard in… ...
- Python Nested FOR Loops - Why do I Need Nested Loops in Python? Nested loops are a very important concept in Python programming and Computer… ...
- Binary Search Algorithm in Python - The Binary Search Algorithm is fundamental in Computer Science. It is a very clever algorithm which reduces the time needed… ...
- Node Class for a Linked List with Object Oriented Python - When you come to study Data Structures such as Stacks, Queues, Linked Lists and Binary Trees for A Level Computer… ...
Python Dictionaries
Dictionaries are an integral part of Python programming which allow you to store key, value pairs with a very fast access time.
- Python Anagrams Challenge - Checking whether two strings are anagrams of each other is a fairly common coding challenge or kata. At a local… ...
- Introduction to Web Scraping with Python and Scrapy - Scrapy is a powerful Python package that makes it easy to crawl the web and mine data. There are many… ...
- Morse Code with Python - In this article we will learn how to use Python programming to convert messages from English to Morse Code and… ...
- Ransom Note HackerRank Challenge in Python - Image courtesy of Sheila Sund from Salem, United States, CC BY 2.0, via Wikimedia Commons. This Python programming challenge is… ...
- Practical Data Science with Python – Selecting Data from a DataFrame - The task: Emulate SQL SELECT with a pandas dataframe E.g. SELECT * FROM table WHERE column_name = some_value; The code… ...
- Python Programming Challenge – Counting Pairs - Here's a fun algorithmic challenge for you. Given a list of integers, write a function to find the total number… ...
- Python Programming – List Mutation - A Surprising Feature of Python Lists What do you expect the output of the following Python code to be? def… ...
- Python Programming Two Sum Interview Problem - This article is about a classic challenge that is often given in Python coding interviews. There are several different approaches… ...
- Introduction to Web Scraping with Python - One of the awesome things about Python is how relatively simple it is to do pretty complex and impressive tasks.… ...
- Python Dictionaries - Some Python developers would say that there are two fundamental data structures which form the basis of the language: lists… ...
Python Algorithms
Algorithms are the foundation of computing. Explore algorithms using the Python programming language in these articles.
- Factorial Function in Python Exploring different approaches to calculating the factorial of a number is a great way to develop your algorithmic thinking skills.… ...
- Prime Factorization with Python This article explores several python programs for finding the prime factorization of an integer in Python. We will start with… ...
- ASCII to Binary Conversion in Python ASCII, which stands for the American Standard Code for Information Interchange, became a communication standard in 1967 and has since… ...
- Copying Lists in Python When working with lists in Python, it's essential to understand how copying lists works, as it can impact your program's… ...
- Append to Dictionary in Python Python's dictionaries are versatile data structures that allow developers to store and organize data in key-value pairs. One of the… ...
- A Guide to all() and any() in Python This article will discuss the all() and any() functions in Python and how to use them in your code. In… ...
- A Beginner’s Guide to Python Lists Python lists often perform the function of arrays in other languages. What is a Python List? Lists are one of… ...
- Understanding the yield Keyword in Python In this post, we will look at the yield keyword in Python and explore how it can be used to… ...
- A Beginner’s guide to Exceptions in Python An exception is an error that occurs during the execution of a program. This article will discuss how to handle… ...
- Calculating the Area and Perimeter of Shapes using Python I've argued for a long time that Computer Science and Mathematics teaching could and should be much more integrated. For… ...
- Python Off-by-One Errors Off-by-one errors are a type of logic error in Python programming, which are surprisingly common and can easily trip you… ...
- Books for Learning Mathematics for Computing From positioning items on the screen to dealing with complex simulations of the laws of physics in animated games, to… ...
- Python Adjacent Indices Challenge In this article we will look at how to use Python to determine whether two indices in a list are… ...
- Tangram Puzzle Puzzles are an excellent way to develop your problem solving skills and have fun at the same time. The Tangram… ...
- Python Anagrams Challenge Checking whether two strings are anagrams of each other is a fairly common coding challenge or kata. At a local… ...
- Practical Python String Methods In this article we will look at some practical uses of Python string methods to manipulate text. Much of the… ...
- Books for Learning Algorithms and Data Structures This page contains recommendations for books to help you learn about algorithms and data structures. There is a lot of… ...
- Power Sets with Python A power set is the set of all possible subsets of a set. For example, if we have a set… ...
- 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… ...
- Prime Numbers in Python In this article we are going to look a some different ways to check whether a number is prime using… ...
- PYTHON USER INPUT User input is one of the things which makes Python programming powerful and interesting, as it provides interactivity. This article… ...
- PYTHON LOOP INVARIANTS Writing robust code is always a good idea, but is particularly important for mission critical contexts, such as where safety… ...
- TRIANGLE NUMBERS WITH PYTHON This post explores some different ways of generating the famous Triangle Numbers with Python. Before reading on, have a go… ...
- PYTHON FUNCTIONS Functions are a very important aspect of Python programming. They provide a way to structure your code meaningfully and also… ...
- Python Loops The ability to repeat tasks many times in rapid succession is one of the things which makes computers so useful.… ...
- Selection Sort with Python In this article we are going to learn how to implement Selection Sort with Python. Selection Sort is a simple… ...
- Pseudocode Not all algorithmic thinking occurs in front of a monitor with a keyboard at hand. In fact, it is often… ...
- Algorithm Animations If a picture is worth 1000 words, an animation is worth even more! Fully understanding an algorithm can be hard,… ...
- Python Debugging Sometimes when debugging Python code, it is useful to be able to see the values of the variables at each… ...
- Automate The Boring Stuff With Python – Book Review Automate The Boring Stuff With Python by Al Sweigart is a great book that will show you how to perform… ...
- How to Trace Python Algorithms with a Visualisation Tool Understanding all the details of how an algorithm works can be challenging, and it is helpful to be able to… ...
- Analysis of Algorithms with Python The efficiency of algorithms is important. Imagine a program that took centuries to calculate the solution to a problem (like… ...
- TI-84 Python Edition Calculator – Product Review I've been a big fan of the Texas Instruments TI-84 Graphic Calculator for many years. It is a marvellous tool… ...
- The Change Making Problem with Python The change making problem has become something of a classic due to what it can show us about different approaches… ...
- The Collatz Conjecture with Python The Collatz Conjecture is an unsolved problem in Mathematics which lends itself nicely to exploration with Python. The idea is… ...
- Morse Code with Python In this article we will learn how to use Python programming to convert messages from English to Morse Code and… ...
- Python Coding Challenge – Modulo Operator In this Python coding challenge your goal is to implement the modulo operator (%) for yourself, without using division or… ...
- Plotting Polynomials with Python I've been enjoying reading A Programmer's Introduction to Mathematics by Jeremy Kun recently. After the introduction, the first main topic… ...
- Python and The Baltimore Stockbroker In this post we are going to use Python to explore the story of the Baltimore Stockbroker. If you were… ...
- Ransom Note HackerRank Challenge in Python Image courtesy of Sheila Sund from Salem, United States, CC BY 2.0, via Wikimedia Commons. This Python programming challenge is… ...
- Exploring Simpson’s Paradox with Python In this article we are going to learn about Simpson's Paradox and explore it with Python programming. Simpson's Paradox is… ...
- The Gambler’s Fallacy with Python and JS In this article, we are going to explore the Gambler's Fallacy with Python and p5.js by simulating sequences of coin… ...
- 100 Doors Python Coding Challenge In this lesson we are going to look at a fun coding challenge in Python called "100 Doors". It's a… ...
- Fizz Buzz Coding Challenge in Python Fizz Buzz is a classic coding challenge based on a game played at school in Maths lessons. Fizz Buzz is… ...
- Python Loops and Flowcharts In this lesson we are going to learn how to convert between Python code and flowchart representations of loops when… ...
- 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… ...
- Introduction to HackerRank for Python Programmers HackerRank is a site where you can supercharge your Python programming skills, master data structures and algorithms, and stand out… ...
- Coins on a Star Puzzle with p5.js Here's a fun puzzle for you, which I have implemented online using the fantastic p5.js library for creative coding. The… ...
- 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.… ...
- Python Programming Challenge – Counting Pairs Here's a fun algorithmic challenge for you. Given a list of integers, write a function to find the total number… ...
Python Turtle Graphics
Kick back and have some fun while getting better at Python programming with the awesome, fun and colourful Turtle Graphics module. You may be surprised just how deep you can go with it.
- Solar System Animation with Python Turtle Graphics and Object-Oriented Programming I found this code a while back and I thought it deserved more attention as it's such an awesome example… ...
- Drawing Circles with Python Turtle Graphics In this lesson we are going to learn how to draw circles with Python Turtle Graphics. We will then modify… ...
- Fun with Fractals – Python Turtle Graphics One of the great things about Python Turtle Graphics is how it gives you instant visual feedback on what you… ...
- Python Turtle Graphics Game – Arachnophobia Here's a fun game written with Python Turtle Graphics. It's called Arachnophobia, and is basically a spider version of Whack-a-Mole.… ...
- Python Turtle Graphics and Tkinter GUI Programming This is an intermediate level Python programming lesson. It discusses the relationship between the Python Turtle Graphics module and Python… ...
- Classic Snake Game with Python This article will show you how to code the classic Snake Game with Python. Stop press! I now have an… ...
- 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… ...
- Exploring Random Walks with Python Turtle Graphics In this post we will be looking at an idea from mathematics called a random walk. In a random walk,… ...
- Ultimate Guide to Free Python Resources for Beginners Learning to program with Python is both fun and challenging. For some, it could mark the beginning of a life-long… ...
- Tron Classic Arcade Game in Python In this article we will have more fun and games with the Python Turtle Graphics Module. There are so many… ...
- Circle Sector Challenge for GCSE Computer Science Maths GCSE and Computer Science GCSE are often taught very separately, and yet they make excellent companions. Writing a program… ...
- Triangle Symmetries with Python Turtle Making connections between GCSE Computer Science and GCSE Maths is a great way to turbo-charge your learning in both subjects.… ...
- The 15 Puzzle with Python Turtle Graphics Around 40 years ago there was a craze which took off around the world. It was a 3-dimensional puzzle called… ...
- The 21 Game with Python Turtle Graphics Here's something fun. The 21 Game is a two-player counting game where each player can add 1, 2, or 3,… ...
- Python Turtle Graphics Demos If you are using the standard installation of Python from python.org which comes with the IDLE editor, there are some… ...
- Fun with Cats – Python API Calls One of the great things about Python as a programming language is that you can do fairly powerful things with… ...
- Python Circle Sector Challenge Maths and Computer Science are often taught very separately, and yet they make excellent companions. Writing a program to explore… ...
Python Data Science
Data Science is hugely important in the modern world, and Python is a powerful tool for processing, analysing, displaying data and more. Using industry standard Python libraries such as Pandas, NumPy, Matplotlib and SciPy you can explore the fascinating world of Data Science to your heart’s content.
- Mastering Excel Automation with Python: A Comprehensive Guide In today's data-driven world, Excel remains a staple tool for organizing and analyzing data. However, manual data entry and manipulation… ...
- Calculating Averages in Python When dealing with data analysis, understanding the central tendency of a dataset is crucial for gaining meaningful insights. Python provides… ...
- Creating Histograms with Python Histograms are powerful tools for visualizing the distribution of data and identifying patterns and trends. In Python, several libraries, such… ...
- Introduction to Python NumPy NumPy is a powerful Python library for working with numerical data. It is primarily used for scientific computing and data… ...
- Working with CSV Files in Python CSV, or comma-separated values, is a simple file format for storing tabular data. It's a popular format for data interchange,… ...
- Installing Python Packages One of the things which makes Python awesome is the quality and quantity of open source packages available to extend… ...
- Introduction to Web Scraping with Python and Scrapy Scrapy is a powerful Python package that makes it easy to crawl the web and mine data. There are many… ...
- Random Numbers with Python Random numbers are very important in computing. Whenever you need to simulate something in the real world where the outcome… ...
- Python Venn Diagrams In this article we are going to look at how to create Venn Diagrams with Python. Venn Diagrams are a… ...
- Plotting Polynomials with Python I've been enjoying reading A Programmer's Introduction to Mathematics by Jeremy Kun recently. After the introduction, the first main topic… ...
- Python and The Baltimore Stockbroker In this post we are going to use Python to explore the story of the Baltimore Stockbroker. If you were… ...
- Sentiment Analysis with Python In this article we are going to learn how to do some basic sentiment analysis with Python, using a wordlist-based… ...
- Hypothesis Testing with Python In this article we are going to use Python to test whether a coin is fair. We will do this… ...
- Finding the Size of a Pandas Dataframe Here's a useful tip for finding the size of a pandas dataframe. It can get a little confusing as len… ...
- Conditional Probability with Python In this post we are going to explore conditional probability with Python. Here's a fun and potentially tricksome question about… ...
- Getting Stock Data using Python and YFinance In this lesson, we are going to learn how to retrieve and display stock data using the YFinance library, which… ...
- Discrete Probability Distributions with Python In this article we are going to explore probability with Python with particular emphasis on discrete random variables. Discrete values… ...
- Exploring Simpson’s Paradox with Python In this article we are going to learn about Simpson's Paradox and explore it with Python programming. Simpson's Paradox is… ...
- The Gambler’s Fallacy with Python and JS In this article, we are going to explore the Gambler's Fallacy with Python and p5.js by simulating sequences of coin… ...
- Python Seaborn – `distplot` is a deprecated function The problem - Seaborn distplot is deprecated Staring with version 0.11.0 of the Python Seaborn data visualization library, distplot is… ...
- Descriptive Statistics for World GDP per Capita with Python The only way to gain proficiency in working with data is through experience. Theory can be important, but unless you… ...
- Practical Data Science with Python – Selecting Data from a DataFrame The task: Emulate SQL SELECT with a pandas dataframe E.g. SELECT * FROM table WHERE column_name = some_value; The code… ...
- Introduction to Data Science with Python The ability to make sense of data is more important than ever in today's complex world. Data is everywhere, and… ...
- Time Complexity in Python Programming This is an article about time complexity in Python programming. In it we explore what is meant by time complexity… ...
- Generating Random Graphs in Python Random Graphs in Python for A Level Computer Science and Beyond The jupyter notebook below shows an implementation of an… ...
- Graphs in Python for A Level Computer Science Part 1 - Networkx Basics networkx is a powerful python package that allows you to easily work with graphs in… ...
- Python for GCSE Science and Maths It often surprises me how little integration there seems to be between Computer Science and other STEM subjects. Just think… ...
- Installing Python Packages with Pip In this article you will learn how to install Python packages using the pip package installer. When you install Python… ...
Computer Maths
Articles covering the overlap between Mathematics and Python programming.
- Factorial Function in Python Exploring different approaches to calculating the factorial of a number is a great way to develop your algorithmic thinking skills.… ...
- Prime Factorization with Python This article explores several python programs for finding the prime factorization of an integer in Python. We will start with… ...
- Exploring Byte to GB Conversions Using Python In the realm of computer science, converting bytes to gigabytes (GB) plays an important role, as it directly relates to… ...
- Exploring Shapes with Python: Sphere A sphere is a fundamental geometric shape that often finds applications in mathematics, physics, computer graphics, and engineering. It's defined… ...
- Exploring Complex Numbers with Python Complex numbers are an extension of the real numbers, consisting of a real and an imaginary part. They are useful… ...
- Calculating the Area and Perimeter of Shapes using Python I've argued for a long time that Computer Science and Mathematics teaching could and should be much more integrated. For… ...
- Books for Learning Mathematics for Computing From positioning items on the screen to dealing with complex simulations of the laws of physics in animated games, to… ...
- Power Sets with Python A power set is the set of all possible subsets of a set. For example, if we have a set… ...
- Prime Numbers in Python In this article we are going to look a some different ways to check whether a number is prime using… ...
- PYTHON LOOP INVARIANTS Writing robust code is always a good idea, but is particularly important for mission critical contexts, such as where safety… ...
- TRIANGLE NUMBERS WITH PYTHON This post explores some different ways of generating the famous Triangle Numbers with Python. Before reading on, have a go… ...
- TI-84 Python Edition Calculator – Product Review I've been a big fan of the Texas Instruments TI-84 Graphic Calculator for many years. It is a marvellous tool… ...
- Python Venn Diagrams In this article we are going to look at how to create Venn Diagrams with Python. Venn Diagrams are a… ...
- Python Coding Challenge – Modulo Operator In this Python coding challenge your goal is to implement the modulo operator (%) for yourself, without using division or… ...
- Plotting Polynomials with Python I've been enjoying reading A Programmer's Introduction to Mathematics by Jeremy Kun recently. After the introduction, the first main topic… ...
- Python and The Baltimore Stockbroker In this post we are going to use Python to explore the story of the Baltimore Stockbroker. If you were… ...
- Solving Quadratic Equations with Python In this article we are going to explore how to use Python to solve quadratic equations and display the graphs… ...
- Drawing Circles with Python Turtle Graphics In this lesson we are going to learn how to draw circles with Python Turtle Graphics. We will then modify… ...
- Hypothesis Testing with Python In this article we are going to use Python to test whether a coin is fair. We will do this… ...
- Conditional Probability with Python In this post we are going to explore conditional probability with Python. Here's a fun and potentially tricksome question about… ...
- Discrete Probability Distributions with Python In this article we are going to explore probability with Python with particular emphasis on discrete random variables. Discrete values… ...
- Exploring Simpson’s Paradox with Python In this article we are going to learn about Simpson's Paradox and explore it with Python programming. Simpson's Paradox is… ...
- Coins on a Star Puzzle with p5.js Here's a fun puzzle for you, which I have implemented online using the fantastic p5.js library for creative coding. The… ...
- Colourful Formatted Tables in Python This post is written for readers with different levels of experience with Python programming and also with Mathematics. Depending on… ...
- 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… ...
- Fun with Fractals – Python Turtle Graphics One of the great things about Python Turtle Graphics is how it gives you instant visual feedback on what you… ...
- Python Strategy Game – Take the Last Stone Here's a fun game. Play it first with a friend if you can. Start with a number between 10 and… ...
- 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… ...
- Python Bitwise Operators Bitwise operators and bit manipulation are like recursion in that they are both topics that are fundamental to computing, yet… ...
- Recursion in Python Programming In this article we discuss recursion in Python programming. Recursion is a fundamental concept in Computer Science, and regardless of… ...
- 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… ...
- 2-Dimensional Lists in Python 2-dimensional lists are an extremely important data structure in Python programming, with many applications. They can be very confusing to… ...
- Retro Sound Effects in Python This post is about how to produce retro sound effects using Python. These kinds of effects added greatly to the… ...
- Python Sets and a River Crossing Puzzle Have you heard of the puzzle about the farmer, the wolf, the goat and the cabbage? You can play it… ...
- Eight Queens Puzzle in Python The Eight Queens Puzzle is a classic problem whose goal is to place 8 queens on an 8x8 chessboard in… ...
- A Puzzle About Socks Here's a puzzle to help practice your computational thinking skills. Don't forget to take it slowly and think through your… ...
- Exploring Random Walks with Python Turtle Graphics In this post we will be looking at an idea from mathematics called a random walk. In a random walk,… ...
- Generating Random Graphs in Python Random Graphs in Python for A Level Computer Science and Beyond The jupyter notebook below shows an implementation of an… ...
- Flowcharts for GCSE Computer Science Representing algorithms for GCSE Computer Science There are several ways to represent algorithms for GCSE Computer Science: Structured English Flowchart… ...
- Pascal’s Triangle with Python Coding Pascal's Triangle with Python is a fun intermediate-level challenge. Pascal's Triangle is a fascinating mathematical structure which contains many… ...
- Triangle Symmetries with Python Turtle Making connections between GCSE Computer Science and GCSE Maths is a great way to turbo-charge your learning in both subjects.… ...
- The 21 Game with Python Turtle Graphics Here's something fun. The 21 Game is a two-player counting game where each player can add 1, 2, or 3,… ...
- Calculating Distance with Python Play Treasure Island by Clicking Here I am very keen to help people connections between Maths and Computer Science. Above… ...
- Introduction to Recursion in Python It was a dark night, the night was dark and the robbers were in a cave. One robber said to… ...
- Conversion from Decimal to Hexadecimal I want to share a little trick which some of you may not know for converting from Decimal to Hexadecimal… ...
- The Euclidean Algorithm on the TI-84 Graphing Calculator The Euclidean Algorithm an ancient Greek method for finding the greatest common divisor of two numbers. In spite of its… ...
- The Jug Filling Problem on the TI-84 CE Graphing Calculator The Jug filling Problem is a very interesting problem which can quickly take you into some fairly deep territory in… ...
- Little Man Computer – Division We recently looked at how to do multiplication using the Little Man Computer instructions. It will help with what we… ...
- Little Man Computer – Multiplication Doing multiplication using Little Man Computer instructions can be quite a challenge for newcomers. Once you can do it, you… ...
- The TI-84 Graphic Calculator This picture is of the Texas Instruments TI-84 Calculator which I make a lot of use of in my teaching.… ...
- Python Circle Sector Challenge Maths and Computer Science are often taught very separately, and yet they make excellent companions. Writing a program to explore… ...
- Broken Chessboard Puzzle Download this image of a modified chessboard, and open it with MS Paint or something similar. Imagine you are trying… ...
- The Sound of Maths 1 – Prime Numbers Have you ever wondered what the first 500 prime numbers sound like? (Of course you have). Well, wonder no longer,… ...
- Python and Maths It seems to me that the connection between programming and maths is often under-emphasized, with some people claiming that maths… ...