Converting Audio File Type in Python

“This audio format is not supported” Have you ever gotten this error message? That’s what inspired this article. I had a file that I needed to be an mp3 file that was saved as an m4a. I needed the file type to be mp3 to work with it. There were two solutions available to me.Continue reading “Converting Audio File Type in Python”

Working with the JSON library in Python

JSON is a format that is used to send, receive and store data from systems in a network. It is referred to as “light-weight” in comparison to larger formats, such as HTML or XML. There are formatting techniques in Python that can be used to convert JSON to Python objects and vice versa. Python is built with a standard library of helpful modules and the JSON module is one of them. Once we import it using the following code, we have full use of its functionalities.

Nested Lists in Python

Nested lists are Python representations of two dimensional arrays. They are used to represent lists of lists. For example, a list of grocery lists for the month or matrices we can multiply. In this post we’re going to go over how to use Python to create and manipulate nested lists. We’ll go over: Python NestedContinue reading “Nested Lists in Python”

Expense Tracker in Python – Level 1

Expense tracking is a common task used in every industry. In this post, we’re going to build a simple expense tracker in Python for exercise. This Python expense tracker will simply track your expenses in a CSV file. By the end of this tutorial, you’ll have a Python expense tracking program that shows you yourContinue reading “Expense Tracker in Python – Level 1”

Level 1 Python: Create an Audio Clipping Tool

Clipping audio files is one of the most basic functions of working with audio data. The `pydub` library makes this super easy. Just like the piece about cropping and resizing images, the only reason this program makes it into the Level 1 Python category is the use of an external library. In this post we’reContinue reading “Level 1 Python: Create an Audio Clipping Tool”

How to Create a Simple Memory Game in Python

Want to have a better memory? It’s been said that playing memory games helps. In this post, we build a simple memory game in Python. This game will test your memory by giving a series of strings for you to remember until you can’t do it anymore. *Disclaimer: memory capacity improvement not guaranteed. How toContinue reading “How to Create a Simple Memory Game in Python”

Image Resizing and Cropping Tool in Python

How do websites make those icons scale up and down with your screen size? By having multiple of the same image in different sizes. If you want to add your logo to your site in multiple different sizes, then you’ll need to learn how to do image resizing. Image resizing is always an annoying task.Continue reading “Image Resizing and Cropping Tool in Python”

Python Affine Cipher (Substitution Cipher)

Affine ciphers are some of the most basic cryptography methods. An affine cipher is a way to encode your words into numbers. It technically falls into the category of “monoalphabetic substitution ciphers”. Like all substitution ciphers, affine ciphers have their weaknesses. I would never use this in a production environment, but it’s fun to playContinue reading “Python Affine Cipher (Substitution Cipher)”

A Complete Guide to Python String Manipulation

I am pretty sure I’ve had to look up how to work with strings over 100,000 times now. Not just in Python, but for programming in general. Strings are not treated the same in each programming language though. For example, you have to use pointers to mess with strings in C. However, Python provides aContinue reading “A Complete Guide to Python String Manipulation”

Private Variables in Python

There are three variable scopes you need to know. There are global variables, public variables, and private variables. Global variables can be accessed from all functions and modules in a program. Ideally they are only declared once in a whole program. Public variables belong to certain classes, but are visible to other classes, functions, andContinue reading “Private Variables in Python”