Blog

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 Readability, the PEP 8 Style Guide, and Learning Latin

Latin and Python Readability

Over the past couple of years, I've decided to start ticking things off my lifetime to-do list. We all have things "we'd like to do at some point when we have time." I finally started carving time out of my days to do these things. In the past two years, I've learned touch-typing (that's right,… Continue reading Python Readability, the PEP 8 Style Guide, and Learning Latin

Simulating Orbiting Planets in a Solar System Using Python (Orbiting Planets Series #1)

Orbiting Planets in Solar System

One of the many applications of programming in Python is simulating the real world. In some cases, the simulation is a way of solving a problem that would be difficult or impossible to solve using other means. In this article, you'll explore simulating orbiting planets in a solar system using Python. You'll create code that… Continue reading Simulating Orbiting Planets in a Solar System Using Python (Orbiting Planets Series #1)

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)

Bouncing Balls Using Object-Oriented Programming in Python (Bouncing Ball Series #2)

Using Object-Oriented Programming using Python to Simulate Bouncing Balls

In this week's article, I'll discuss an example of using object-oriented programming in Python to create a real-world simulation. I'll build on the code from the first article in the Bouncing Ball Series, in which I looked at the simulation of a single bouncing ball in Python. This article will extend this simulation to many… Continue reading Bouncing Balls Using Object-Oriented Programming in Python (Bouncing Ball Series #2)

How to Create Any Image Using Only Sine Functions | 2D Fourier Transform in Python

2D Fourier transform in Python Earth and grating image

What are the individual units that make up an image? Sure, one answer is pixels, each having a certain value. Another surprising one is sine functions with different parameters. In this article, I'll convince you that any two-dimensional (2D) image can be reconstructed using only sine functions and nothing else. I'll guide you through the… Continue reading How to Create Any Image Using Only Sine Functions | 2D Fourier Transform in Python

Understanding Python Functions With The Function Room (The White Room Series #2)

Python functions as doors

You've probably already learned about defining functions in Python and how to add parameters and return statements. You may even have learned about more advanced features of Python functions. But can you picture exactly what they do and what's really happening behind the scenes when you call a function? In this blog, I'll build on… Continue reading Understanding Python Functions With The Function Room (The White Room Series #2)

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)

Monty Will Help You Learn Python Coding, But Who’s Monty? (The White Room Series #1)

learn python with the White Room analogy

When you learn Python coding, you start by learning about the tools you'll need and the rules for each one of those tools. You learn the syntax of the for loop and what it does, for example. With time, you also learn when to use this tool and when not to use it. What's more… Continue reading Monty Will Help You Learn Python Coding, But Who’s Monty? (The White Room Series #1)

Python Instance Variables and Kids on A School Trip

Python instance variables and kids on a school trip

How are Python instance variables different from standard variables? Are they the same thing as data attributes? And what are data attributes? And what do kids on a school trip have got to do with all of this? Questions, questions and more questions. Understanding instance variables in Python tends to happen in stages. First, you… Continue reading Python Instance Variables and Kids on A School Trip