About a year ago, I created a blog series on a novice learner’s journey into the world of code through a look at the basics (read the whole series here). Now, with a much larger knowledge base and understanding of both code and Replit, I am taking it a step further into a new language and project. My goal is to create a practical beginner project and justify why using Replit is the best option, even for beginners.
Think of coding as cooking, but with a computer! In the kitchen, the recipe is the instructions (program) for the chef (computer) to execute. Just as different recipes create different meals, different programming languages produce different output. Therefore, it is important that the language chosen matches the desired outcome. I wouldn’t use a recipe for lasagna and expect a cake, would I?
The problem I am trying to solve is interpreting how much money I have spent on Amazon this year and then evaluating the trends of my spending. Now, couldn’t I just create a spreadsheet to show all of this data? Wouldn’t that be easier? The short answer is yes, I can, but it really is not easier!
Just as a chef searches for the right recipe to make a chocolate cake, I need to decipher the best language to portray my data in a functional manner. After spending time on Replit Learn (a great place for any level of learner to go for ideas) creating a project using this cool tutorial on weather stats, I found Python to be most intriguing. Additionally, Python provides great functionality for data and statistics projects, making it the perfect recipe to follow.
So, what is Python? It is a general purpose, object-oriented, highly-readable, language that is a staple for anyone who wants any career in software development or engineering. Python relies more heavily on words and less on syntactical language, unlike many other languages, which makes it a great fit for beginners. (Replit's Intro to Python curriculum is a great resource for teaching beginners too.)
Additionally, for this project, I needed to install a package, basically an assistant to Python. As a chef, a recipe is vital, but there are other items that can make cooking even easier (how about using an automatic mixer instead of stirring by hand?). In this case, Pandas is the “automatic mixer” that provides expressive and flexible data structures designed for real world data analysis.
Now that the language (and package) and project are decided, I can start my repl. As always, I “create a repl” and select my language, “Python.” In this case, since I am working with sensitive personal information, it may be a good idea to make my repl private with Replit's Hacker plan. Next, I need to import my package, Pandas. There are several ways to do this, but the easiest one is to type ‘import pandas as pd’ as my first line of code and watch the magic happen. In mere seconds, I have gone from nothing to a functioning code skeleton that is ready to interpret my data.
The beauty of Replit is nothing has to be downloaded and everything lives in one place. It can’t get any easier than writing one line of code to import an entire package. The mission of Replit is to give everyone coding superpowers! Replit, more than ever, makes it so easy for anyone to go from illiterate to empowered.
Next time, I will focus on importing my assets and setting up my data frame in order to start deciphering exactly how much money I have spent on Amazon in the last year.