Image for post
Image for post

Python trees are a lot like linked-list, but with a hierarchical order. Trees are composed of nodes that link to other nodes. The bottom node that doesn’t have a link are referred to as leaves. The node that linked to another node is known as the parent, and the linked-to are the children.

A tree is typically built with a wide range of nodes, or a cascading deep structure. So you can say a tree is either wide or deep.


Image for post
Image for post

You ever wonder how all the data we have computers can so easily pull up information from seemingly thin air? Do we just take it for granted that computers are so smart, and can memories a list of our friends and their addresses as if they understand the relationship between those two data points.

Well… depending on what side of the argument you’re on -you’re either happy or not that they don’t, because we have to trick them.

Hash-maps are a relative easy, and beautiful concept to comprehend. Hash-maps use arrays to fill in information. …


Image for post
Image for post

So now in our third act we’re ready to write out a script for our game. Our Node and Stack classes are written, and ready to be imported. Let’s initiate our game by welcoming the player with a print statement — Let’s play Towers of Hanoi!!.

The first thing we should do is build the infrastructure of Hanoi Towers. There’s three stacks, and some disks to move around. We’ll let the player decide the number of disks, so let’s just set up the three stacks first. Thankfully I already have a Stack class for that. I’ll make three of them…


Image for post
Image for post

Linked lists are one of the basic data structures used in computer science. They have many direct applications, and serve as the foundation for more complex data structures.

There are different types of list, for example stacks which work on a first-in-last-out principle (FILO). Imagine setting a stack of dishes. The one you can see is the last dish added on top of the stack (known as the head node), and to get to the last dish you’ll have to traverse down the stack to the last node (tail node).

Another type of list is the queues list, which much…


Image for post
Image for post

In my Hanoi Tower series I’ll go over data structures using python. In particular nodes, linked lists, and stacks. The culmination of which will enable us to create a script for the hanoi tower game.

Nodes are the basic building block of data structures- made up of two parts: the data it holds, and a link that points it to the next node block in the data structure. All of these nodes together will give you whatever you data structure is. Structures like these are like buildings downtown, and the nodes are the bricks that build it. It’s a great…


Image for post
Image for post
Let’s Code the Free Market

I wanted to go over classes in python and how to inherit their information so that we have an intermingling program of classes working with proper functions. My scenario here is a market place to sell art, and the clients who buy and sell.

So to begin I’ll set up a Marketplace class. Now my market place is going to be simple, as it’s just really a listing of what’s for sale. To begin it’ll be an empty listing, and as our market place business matures pieces of art can be added, or removed. …


Image for post
Image for post

In my last article I explained how to set up a python class with some basic parameters using the dunder methods, and a custom function to handle a student’s grade average.


Image for post
Image for post

Python objects are an essential tool when programming. It can bring real dynamics to what you are trying to achieve, and broaden the creative scope one can accomplish when writing a script. So I wanted to explain some of the basics, and lay out the case for why coding in python can be one of the most simplest and powerful languages out there.

Python allows us to store data in many different ways. These are known as ‘types’. For example a float is a number followed by decimals, while an integer is a whole number. You can also have strings…


Image for post
Image for post

In my latest article on data science I’ll go deep into using Seaborn. A visual module in python that charts different graphs for us. For my data-set I’m going to use the micro-loan nonprofit group Kiva to get a peek into how loans are distributed. If you want to follow along or find some other data sets to explore Kaggle is an excellent resource.

My usual suspect modules are: pandas, matplotlib, and seaborn. I can use pandas to help me better understand the data, so as usual I can exam the table thoroughly and decide how to proceed from there.


Image for post
Image for post
when netflix and chill isn’t enough

Most practitioners don’t like to mention it, but I’m just following the money, and nothing takes to data science like money. The well-off may like to preach the story of the self made man, but nothing is more adverse to risk-taking than coin, and what is data science if not the most un-risky understanding of one’s situation? If you have spent any time using python to analyze data than you’d know what great revelations data scientist can have about the natural world. In this article let’s apply that to the market. …

Abel Garrido

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store