Functions in Python are Like a Coffee Machine

Functions in Python are like Coffee Machines - a coffee cup on a desk with computers

Functions in Python are one of those topics for beginners! Most understand what functions are at a basic level. However, there's much more detail and nuance to defining and calling functions in Python. As with most things in coding and Python, there's nothing better than a good analogy to picture what's happening behind the scenes.… Continue reading Functions in Python are Like a Coffee Machine

Sunrise: A Python Turtle Animation Using Named Tuples

Flower in sunrise to illustrate a Python turtle animation using named tuples

You may think the Python turtle module isn't useful for anything. "It's just for kids", is what many think of it. However, this module allows you to explore and experiment with many areas of Python. In this article, you'll write a Python turtle animation of a sunrise scene using named tuples: https://videopress.com/v/OgwI5VyJ?resizeToParent=true&cover=true&preloadContent=metadata&useAverageColor=true As you work… Continue reading Sunrise: A Python Turtle Animation Using Named Tuples

Debugging Python Code Is Like Detective Work — Let’s Investigate

Sherlock Holmes in Debugging Python code

Debugging Python code is not a mysterious art form. It's like a detective solving a mystery. This analogy comes from one of my favourite programming aphorisms: "Debugging is like being the detective in a crime movie where you are also the murderer" (Felipe Fortes). So what can real detectives tell us about debugging Python code?… Continue reading Debugging Python Code Is Like Detective Work — Let’s Investigate

Understanding Two-Point Perspective Drawing using Python

Have you ever struggled to truly understand a topic? Perhaps one related to your work, or maybe linked to a hobby? Writing a computer program to investigate the subject can often help you get that extra level of understanding you're looking for. I've often used this method to understand fairly abstract physics concepts in my… Continue reading Understanding Two-Point Perspective Drawing using Python

What is coding? Beyond the obvious…

The Matrix: What is coding?

This week, instead of one of the tutorial-type articles I've been publishing recently, I'll go back to basics with an article aimed at those who are new to coding or those who are interested to know more about what this subject really is. Until relatively recently, coding was a subject reserved for a select few.… Continue reading What is coding? Beyond the obvious…

Practise Using Lists, Tuples, Dictionaries, and Sets in Python With the Chaotic Balls Animation

Using lists tuples dictionaries and sets in Python

One of the early topics covered when learning to code deals with the built-in data structures in Python. Lists are usually learned early on, followed by dictionaries and tuples. Sets are not normally one of the earliest topics covered. However, that's not because they're complex but because they're used less often in Python. Understanding the… Continue reading Practise Using Lists, Tuples, Dictionaries, and Sets in Python With the Chaotic Balls Animation

Python City: Understanding how a Python Program Works (The White Room Series #3)

You've written a Python script or a project containing several modules. You press Run, figuratively or literally. What happens behind the scenes in the microseconds or seconds or minutes it takes for your program to run? You can dive into the details about the internal functioning of Python to learn how a Python program works.… Continue reading Python City: Understanding how a Python Program Works (The White Room Series #3)

The Real World in Python: Coding A Bouncing Ball (Bouncing Ball Series #1)

Simulating a Bouncing Ball in Python

The real world can be a difficult place to understand. Whether you're trying to make sense of the people that make up the real world and their actions, or the physical world itself, things are never easy. Sometimes, coding can help understand what's going on and maybe, just maybe, help find a solution to a… Continue reading The Real World in Python: Coding A Bouncing Ball (Bouncing Ball Series #1)