Coding Education STEM

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 […]

Read More
Coding Education STEM

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 […]

Read More
Art Coding Education STEM

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 […]

Read More
Art Coding Education STEM

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 […]

Read More
Coding Education STEM Uncategorized

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 […]

Read More
Coding Education Javascript STEM

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 […]

Read More
Back To Top