In this post, I discuss some common sorting algorithms, their logic, share their implementation (code), and demonstrate each one with executable scripts. Then I compare their performances to identify the most efficient sorting algorithm(s). You’ll get a good overview of each one, learn how to code and use them, and understand their strengths and weaknesses. […]
Tag: programming
Combinations in Python
In this post, I present the concept of calculating combinations from different choices. For educational fun, I will combine various parts of the bodies from two different creatures and see how many combinations we get. You’ll get to enter the animals to combine, and even get a name for your new mutant! If you have […]
Overlay Real-time Animations Using Pygame
In this post, I demonstrate how to load an image file and do some simple overlay animations, such as drawing different shapes of different colors at ever-changing locations over the image using nothing but the good-old Pygame library. The code and working demo are embedded below. I wanted to load a static image of my […]
Unicode transformation fun
In this post, I share some exercises of encoding a usual string of English/Latin alphabets into a readable Unicode version with styling but still into a text that can be copied/pasted anywhere without any special app, and then transform the input text into some interesting Unicode symbols (that can also be copied/pasted anywhere as text). […]
Custom Chess Board Setup for Sim and Puzzles
In addition to solving real-life and abstract challenges, I love playing chess and mulling over different scenarios. When I don’t want to play the entire game from beginning to end, but rather start at a climactic stage, it makes it even more exciting and challenging to play it to the end with someone or even […]
Brain Teaser: Palindrome Checker 45611-1445
Here is a quick Python coding puzzle or brain teaser for educational and/or entertainment purposes. The challenge is quite simple but is useful for learning or refreshing your coding skills while exercising some logical thinking. Objective Write a Python program that takes an input from the user (a word or a phrase) and tells the […]
Brain Teaser: Get all numbers divisible by your choice of a number
Here’s a little brain teaser and the solution. The challenge is to get a number input from users and your task is to show all the numbers it can divide wholly (leaving no remainder) upto a certain limit. For example, if I want to know which numbers are divisible by 37, I would enter 37. […]
Funnel charts
In today’s data-driven world, visualizing complex information is crucial for making informed decisions. Among the myriad of chart types available, funnel charts stand out for their ability to represent the progressive stages of a process. Picture this: you’re diving into the analytics of a killer marketing campaign, tracking the journey of potential leads, or deciphering […]
Box and Whisker Plot (seaborn example)
In a previous post, I shared an example of Box and Whisker plot with a small sample dataset. In this post, I’m using a larger dataset from Seaborn library of Python and go a little deeper with more examples using Python. We have a dataset in the Seaborn library called ‘tips’ that’s perfect for exemplifying […]
Interactive Word-tree and Column chart
This post presents examples of a Word-tree chart, and a Column chart that are created using Google Chart engine that are interactive and can be embedded in a HTML page. We have a sample dataset of 250 college students’ favorite drink brand names in a raw format (fictitous dataset): Coca-ColaPepsiStarbucksRedBullMonsterGatoradeCoca-ColaPepsiDrPepperDrPepperStarbucksRedBullMonsterGatoradeCoca-ColaArizonaDrPepperArizonaRockstarCoca-ColaSprite7UpPepsiNestlé-Iced-TeaSprite…etc. Now I want to accomplish […]