"Star Wars vs. Star Trek"

My friends and I will sometimes chat about which is better - the Star Wars movie, or the Star Trek television show. Let's look at some data and see which one wins!

We'll be doing this,

  • Reading from a data file and computing a total score
  • Making sure we don't get incorrect search results if a word is within another word
  • Learning to make code less-redundant and easier to change in the future

We'll provide structures along the way to assist you, you shouldn't feel like you have to invent the solution entirely on your own.

Don't worry if your favorite show doesn't get the highest score! All we've computed is how popular it is on Buzzfeed, which isn't the same as computing how good it is :)

(Ben's note: reading data files like this is a common task in software engineering. I will divide the assignment into small pieces to help students not feel overwhelmed. The task encourages self-direction, and is connected to what students care about, especially for the final stages which involve the student picking their own tv show or movie and seeing the results. I've decided not to use modern Python's type annotations so that students can first focus on the problem at-hand. I'll use the older-style import x instead of from . import x as I have found it is easier for beginners. And I won't refactor into helper methods as often as usual as my examples will mimic a beginner-programming style, using loops instead of any, and so on.)

Please have main/01code.py open when reading 01.md, and so on.