I am thrilled to announce that the end-to-end system for a book library is now finished and available for download! It’s a comprehensive package of a preloaded SQLite3 database designed for simulating a book library using Python with all source code and documentation included. The database contains 4 tables (preloaded, and fully documented) and sample […]
Tag: programming
Getting Data From A Website Without A Developer API Key
It started with a simple quest: I wanted to look up a word and get its example usage in sentences, along with its meaning without having to search each time. I wanted to just type in a word, and get its basic meaning, and a few example sentences using my own app or script. Yes, […]
Interactive Color Mixing App And Explanation
In this post, I present an embedded Python app that takes two colors as inputs in html color convention (that uses Hexadecimal color codes), and produces a mixed color of the two. Furthermore, the user can also specify the mix proportion or the ratio of the first color to be mixed with the second color. […]
Zip Function in Python: How and Why
The zip() function in Python is very useful, versatile, and efficient for combining elements from multiple iterables (like lists or tuples) into pairs or tuples. No, it’s not the file zipping functions most are familiar with in Windows; despite the same name, it’s an entirely different function for different purposes. Here are some practical scenarios […]
Three Lines Puzzle with Dots with Interactive Solution
Let’s look at a classic “Seven Dots Puzzle”, also known as the “Three Lines Puzzle with Seven Dots” and if we code it in Python and show the solution interactively. In this puzzle, we have seven dots arranged in a specific configuration, and the challenge is to draw three straight lines such that each dot […]
Python teaser/puzzle: FizzBuzz Twister
Objective For numbers 1 through 20, print “Fizz” if the number is divisible by 3 (no need to print the number), “Buzz” if it’s divisible by 5 (no need to print the number), and “FizzBuzz” if it’s divisible by both (no need to print the number). Otherwise, just print the number. For example, for numbers […]
Why use dataclass decorator in Python?
A dataclass decorator in Python is a handy feature introduced in Python 3.7 to simplify the process of creating classes that primarily store data. The decorator generates boilerplate code, like init, repr, eq, and other special methods, making code more concise and readable. Essentially, using dataclasses simplifies the process of creating classes. In this post, […]
Stacks and Heap Basics in Python
Python, like most high-level programming languages, has the concept of stack and heap, although it might not be as explicit or direct as in C++ or Java. While we may not need to typically explicitly manage memory in Python, having this knowledge equips us with the skills to write better code, debug issues effectively, and […]
Password strength and cracking
In our digital age, the importance of having strong, secure passwords cannot be overstated. With cyber threats on the rise, ensuring that our online accounts are protected is more crucial than ever. In this blog post, I share the core mechanics of measuring a password strength and share a practical approach to estimate how long […]
The classic “Two Trains” problem with interactive solution
You may have heard of the classic puzzle: Two trains start from two towns, heading towards each other. One train leaves Town A heading towards Town B at some speed while at the same time, the other train leaves Town B heading towards Town A at another speed. If the distance between the two towns […]