Yes, I love Flask quiz apps that tell me which character from The Office I am, but sometimes I just want to store some data in a database! For example, I might want to keep track of all my favorite restaurants in Southern California.
In this tutorial, we’ll learn how to do exactly that, using one of the least painful databases compatible with Flask apps: Firebase, a NoSQL database for web and mobile applications.
So you’ve built Flask apps before, but now you want to dip your toes into the daunting world of databases. The least intimidating way to get started with databases is with the most old-school database in the book: the flat file. It’s just a CSV file that stores rows and columns of data, separated by nothing more than line breaks and commas!
As an enthusiast of both ancient history and Python programming, when I stumbled upon this data set about Roman emperors, I knew what I had to do… use it to make a data visualization in Python!
Browsing the columns, I decided to chart the different ways the emperors rose to power. Sure, you could be born as the son of the emperor, but how often did “seizing power” actually work?
Feel free to code along with me to learn how to read a CSV file and make a bar chart in Python! …
Tired of making text-based choose-your-own-adventure games in Python? Ready to take your Python programs to the next level by incorporating an HTML/CSS graphical user interface?
Flask is the perfect framework to build an HTML/CSS web app with a Python backend. In this tutorial, we’re going to build a The Office-themed Flask application… on Glitch!
Yes, you heard me right — no frustrating downloads or setup, no banging your head against the wall. You can build this Flask app directly in your browser using Glitch!
We’re going to make this app which asks for your desert island book choice…
Scenario: you need some art. Maybe you need a new computer background, maybe you need a classy print for your new apartment, maybe you need a new banner for your LinkedIn page. You need art, and you need it fast.
Generative art is art produced by a computer program. My pastel bubbles on are the result of generative art, and anyone can program their own art as well.
Software developers estimate spending up to 50% of their time debugging code. It’s safe to say that computer science classes also see their fair share of debugging! Here are a few best practices for computer science teachers to help students not only debug their code, but also develop problem-solving skills and confidence.
Cut down on bugs in the first place by preempting common student errors. As you go through a codealong, literally warn students of potential pitfalls: “A common mistake students make is to just start using a variable without declaring it. …
So you’re about to enter the magical world of teaching computer science, combining the creativity of lesson planning with the satisfying problem-solving of coding. From curriculum to classroom culture, there’s a lot to think about as you dive into teaching a subject for the first time.
There are many pre-made curricula available for computer science classes, and a number of them are free! You can use the curriculum outline of a pre-made course to help design the scope and sequence of your own class and cherry-pick the provided activities that you like.
If you have more than two new preps…
Gone are the days of the hoodie-wearing, basement-dwelling hacker. Computer science is a social pursuit. Engineers need communication and collaboration skills, and they can learn these skills in computer science class!
Initially, some students may be reluctant to work with others and profess that they work better alone. However, students have a better time in computer science class when they can problem-solve with friends and classmates. Difficult problems are less scary with a friend, and students can learn from each other!
Below are some specific strategies to encourage collaboration in computer science class.
In pair programming, two students work together…
This beginner-level tutorial shows you how to analyze a foreign language text using Python NLTK (Natural Language Toolkit), a Natural Language Processing platform which allows you to break down words into their stems and determine the most commonly used words in a text.
Computer science can connect to any other discipline — so if you’re curious about programming and dream of life in an Italian villa, this tutorial is for you!
In this tutorial, we’re going to analyze the text of Dante’s Inferno through its word frequencies. Inferno is a 14th-century Italian poem that details the author’s fictitious trip to…