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 […]
Tag: python
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 […]
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 […]
Drawing Graphics using Python (Turtle)
In this blog, I show you how to use draw graphics in Python. Objective:Â I want to draw dots (circles, really if they’re larger than a pixel)…of different sizes and colors at various locations multiple times (I chose 100X for this demo). This is how the output looks like: Source Code: The complete source is below. […]
Creating Magic 8 Ball Game in Python
Howdy! If you’re getting tired of Magic 8 ball game implementations in different languages, I have good news. I’ll stop (for now) with this last variant…this, in Python. The simplest, quickest code block happens to be in Python…as far as logic goes. In order to do graphics, animation, sound stuff, it’s not that great as […]
Analytics From Text?
Yes. From simple text “dump” of data, we can do some amazing things. Well, that’s what they’re already doing…the data scientists and other variants. I only present a simple example of the possibilities here 🙂 First, you should read my post about XML here. Then, I take that to another level here in this post. […]
Making A Favorites List…
We all have favorites…movies, shopping list, tv shows, clothes, etc. etc. etc. Ok, welcome! Today, I’ll show you how to create a favorites movie list in XML…why XML? Because from this format, I’ll do some amazing things like analytics. First on this post though, I’ll show you how to store the list in a structured […]