This is a one-player Blackjack game (playing against a non-human Dealer) simulating common rules of Casino Blackjack in the USA. The code is shared under the licensing term as listed. This is all Python 3.x code and has been tested on Windows although it should work on other platforms. It can also be made into […]
Category: STEM
Car simulation and analytics. OOP in Python
In this post, I share a program that is built with an object-oriented design from the ground up in Python. It’s a game or simulation if you will, but has all the plumbing necessary to make it fancier, and a 2D or even a 3D game. It works as follows:You create a car object. Then […]
Etch-a-sketch using Pygame
In one of my past posts, I demonstrated an Etch-a-sketch program using Python’s Turtle library. In this post, I demonstrate writing a similar app using pygame library with new twists. The idea is similar…you use up/down/right/left arrow keys on your keyboard to move the drawing cursor…however, you can also press up+right to make it go […]
True text transformation without using any special libraries (Python)
In this post, I’ll share a real example (and an application that you can download and use for your personal use) on how to turn text into fun representation such as: flipped, reversed, substituted with other characters using Python. The output is not an image, but still real text that are not easily accessible from […]
Geometric Shapes with Tkinter & Turtle
In this post, I’m sharing a complete Python program that draws various geometric shapes on screen with given parameters (e.g. side length, radius, height, tilt, etc.). The application is downloadable here and can be executed on a Windows device (tested on Windows 10). The download will be a ZIP file called tkinter-drawgeometricshapes.zip —copy or unzip […]
Venn Diagrams Done Right (Excel)
Venn diagrams are best used to show overlapping or interconnected relationships, especially overlapping segments. While they are ubiquitous, very few diagrams actually update automatically when data changes…that’s because most of them are one-time illustrations with no ties to the underlying data…they’re just drawn up like Infographics. It doesn’t have to be that way! In this […]
Network graphs explained with scenarios (Python) – Part 2
This is Part 2 of the series “Network graphs explained with scenarios“. Please read Part 1 first for proper continuity. A few of the scenarios I cover in this blog series here: Project scheduling example – Shows how to compute critical path on a network of related tasks. Covered in Part 1.Routing example – Shows […]
Network graphs explained with scenarios (Python) – Part 1
Network graphs are quite fascinating to me. They are all around us and used daily in a multitude of real-world applications from supply-chain, routing, mapping, social media, scheduling, to networking. In this two-part blog series, I’ll go over some real-world applications of graphs and how to generate them dynamically using Python. There are many complex […]
Mass and Energy – Explained Simply
In this blog, I explain in simple terms, the relationships between mass, weight, and ultimately energy as it relates to anything, including your own body mass, and how all of this can be tied to Einstein’s equation: E=MC^2. By the end of this post, you’ll be able to tell how much energy is stored within […]
Monet’s still painting brought alive
Here I’m sharing my first little experimentation with animating a still image. Not the cheesy, cartoony added animation layers on top of the image like TikTok or most other apps feature these days, but rather using the intrinsic pixels of the original image and manually specifying which pixels would move, how fast, how far, where, […]