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 […]
Category: STEM
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 […]
A Guessing Game in Python…
Let’s play a simple number guessing game! Then, let me show you how to program the game in Python. Nothing fancy…but core logic here. Gameplay: Here’s a sample output of the screen. Computer (AI) guesses a number (1-20 inclusive) and you guess the number via tries. Computer tells you each time if you’re “hot” or […]
What is the mean age of 11-15?
This is an easy question “What is the mean age of 11-15?” really but it’s worth for people to understand the different concepts and differences between “mean“, “arithmetic mean“, “statistical mean“, “average“, “midrange“, “median“, and “mode“. The arithmetic mean and average are the same thing. So, if you find the average of the numbers 11 to […]
y^2 = -x and x= 2y…so?
y^2 = -x and x= 2y; and neither can be zero. Solve for x and y 🙂 Fun one. If I share the solution, it’d be no fun, but I’ll give you a hint below (you can do this) but do the process to get to this 🙂
The world’s first “smart”-phone
It was in the late 90s when, fresh out of university, I got my first real career job at now defunct Geoworks based in Alameda, CA (their Seattle resources taken over by Amazon.com since). They built the embedded platform on Unix for various mobile devices including PDAs, beepers and such (remember those?). I was on […]
Adding sound to Python code
Python isn’t necessarily for multimedia programming, so only recently I looked up ways to add audio in a Python script. Turns out there are several ways to do that. They’re all really simple. Methods to add sound: 1. import winsound fname = “soundfile.wav” winsound.PlaySound(fname, winsound.SND_FILENAME) 2. import pygame pygame.init() s = pygame.mixer.Sound(“soundfile.wav”) # Start playback […]
Python and SQL
As expected Python has great connectivity to SQL and its variants; Python is made for queries and data analysis afterall. So, I decided to tinker with it a bit (I’m not a programmer per se, see my About page; so I share these simpler, more approachable codes for inspiring interest and education for beginners and […]