Howdy y’all! Today we’re diving back into OOP (object-oriented programming), and this time we’re looking at object interactions through the lens of “consolidation.” Let me explain:

We have two objects of the same class Basket. They both have an attribute holds, and an attribute has. The first attribute is how…


What Is OOP?

Before we get into the meat of this lesson, there’s a few things that need defining. Obviously the terms in the title need it, but so too does “object-oriented programming” (OOP), the topic within which all of this sits.

OOP is a way of thinking about (and doing) code that…


Howdy folks! Today we’re talking randomness and text generation. But fear not, this won’t be a complex natural-language processing (NLP) approach to text generation. Instead, we’ll be diving into using NumPy and string formatting with Python to generate simple randomized text blocks. As an example, I’ll be using bits of…

(Part Two)

This is the second installment of a series on simulating the dice game “Left Center Right” with Python. By no means do you need to read the first part to understand this one, but if you want it’s linked here.

In the previous installment we looked at the different types…

Three dice on a pile of blue coins.
The LCR game pieces.

We’re At A Table

You, me, and at least one other player are sat at a table. We all have three tokens. There are also three dice. We go around clockwise rolling the dice, and passing our tokens in a fashion dictated by the dice: “L” or “R” for passing to the player on…

We’ve all gotten spam, we’ve all felt its hideous, annoying burden, and we’ve all (but Lord I hope not) had to lovingly explain to a grandparent that “No, that strange digital letter isn’t actually from a foreign king in need.” …

You want boilerplate code and I get that — it’s immediately below this. But I encourage you to read on after, to do more than just a grab and dash. In the sections following the boilerplate code, I talk about:

  • What the boilerplate code is actually doing, line by line

Steven Zych

Data Scientist / Python Programmer / NLP Geek

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