In the following simple C program, I’ll demonstrate how to capture keystrokes and turn them into something completely different…other than what the key labels read. This is the basic idea behind changing keyboards from English to another language; take the input from the key, read its character code (ordinal value) from the operating system, and […]
Tag: coding
Digit To Word And Vice Versa (Python)
How can we convert in a program from words like “eight” to the number 8? How can we convert the number 10 to the letters “Ten”? Here, I show you multiple ways to do it bi-directionally…from letters to digits, and digit to letters. I’ve seen several implementations and many rely on ASCII ordinals. But I […]
Let’s Play Palindrome! (C/C++)
Did you know that the longest Palindromic word in the Oxford English Dictionary is “tattarrattat” coined by James Joyce in Ulysses (1922) meaning “a knock on the door”? What is a Palindrome, you ask? Well, you already know it or have seen it. According to Wikipedia: “A palindrome is a word, phrase, number, or other […]
Let’s Play Palindrome! (Python)
Did you know that the longest Palindromic word in the Oxford English Dictionary is “tattarrattat” coined by James Joyce in Ulysses (1922) meaning “a knock on the door”? What is a Palindrome, you ask? Well, you already know it or have seen it. According to Wikipedia: “A palindrome is a word, phrase, number, or other […]
How Similar are Two Words?
Ever wonder what similarity a pair of words have with each other? Quantifiably? As in percentage? As in 50% match or 100% match, etc.? (Whoa, wouldn’t that be great if that worked out in dating world, eh?). Anyway, it’s okay if you haven’t wondered about it, because I did and here I share a few […]
Letters to Patterns (what does your name look like?)
Letters, in whatever language/scripts are really glyphs aren’t they? They’re a visual representation of a letter that’s supposed to sound (or not sound) like something that we repeated until we memorized it since birth. All good 🙂 I was thinking of different ways to represent letters…you know, just for fun! Yes, I’m weird like that. […]
Word-Game: “Words Matter!” (Python)
Welcome back! Today, I share a new game idea (I thought of it myself but if there’s any such game out there, it’s a pure coincidence and I did NOT use those as a foundation). Disclaimer and (c): The idea cannot be recreated in any shape or form for any purpose (other than learning/education) without […]
Fill-up Tanks Quiz (Scratch)
Welcome back! You’ve surely seen images as below that appear online (internet sites, social media apps, etc.) Â In this Scratch app, I’ll demonstrate how to turn those static quiz images into an interactive, dynamic quiz application. Ouput:Â This is what a quick game play session looks like in this app. Design: First, I need […]
Lissajous curve in Python
Alphabet Soup…For Real!
What if I wrote a program to generate ALL possible combinations of words (EVERY possible) English language? Well, here’s the result. A snapshot of my program running (electric bill hiking) 🙂 How many times will it run (Notice I put in the number of shuffles in each line)? The answer is, we have 26 letters […]