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 […]
Tag: computing
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 […]
Program to care for a pet (Scratch)
Hello, and welcome back. Today, A fun program to introduce kids/beginners to understand logic and loops while taking care of a pet fish 🙂 Easy to code and easy to play. Code is commented with explanation. Check it out here: https://scratch.mit.edu/projects/282372671/ Enjoy! Challenge: I intentionally kept the core code simple and uncomplicated. However, if you grasp the […]
Abstract Art with Code (Art<->Tech). Volume III
VOLUME 3 If arts and tech had a baby, may it’d look like me 🙂 Anyway, I love mixing the two, interconnecting, and interpolating them…because I’m always curious. Results can be incredibly satisfying or surprising. These are not the best of my work in any form in coding, but wanted to share these short programs […]
Abstract Art with Code (Art<->Tech). Volume II
VOLUME 2 If arts and tech had a baby, may it’d look like me 🙂 Anyway, I love mixing the two, interconnecting, and interpolating them…because I’m always curious. Results can be incredibly satisfying or surprising. These are not the best of my work in any form in coding, but wanted to share these short programs […]
Abstract Art with Code (Art<->Tech). Volume I
VOLUME 1 If arts and tech had a baby, may it’d look like me 🙂 Anyway, I love mixing the two, interconnecting, and interpolating them…because I’m always curious. Results can be incredibly satisfying or surprising. These are not the best of my work in any form in coding, but wanted to share these short programs […]
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 […]
Creating Magic 8 Ball Game in C/C++
I’ll continue with the Magic 8 ball theme in this coding series. Previously, I posted a fun implementation in Scratch here. If you’re not familiar with it, that’s the best place to start as it has visual aspects and a video clip. This time, I’ll implement the same concept in C/C++ (mostly in C++). To […]
Creating Magic 8 Ball Game in JavaScript
I’ll continue with the Magic 8 ball theme in this coding series. Previously, I posted a fun implementation in Scratch here. If you’re not familiar with it, that’s the best place to start as it has visual aspects and a video clip. This time, I’ll implement the same concept in JavaScript. However, because I’m tired […]