Hacker News new | ask | show | jobs
by elonmollusc 2111 days ago
Here are some projects that I've assigned in my programming and algorithms classes. All of these projects can be done in Python or any other language.

For general object-oriented programming and working with lists/sets, write your own versions of classic 2-D arcade games like Snake, Asteroids, Pac-Man, or Breakout. You can use simple geometric shapes and any drawing framework if you don't want to create complex graphics.

Conway's Life, Notakto (2-D arrays)

Frequency-based cipher analysis (easy application of hash tables)

Password cracking (hashing)

Search engine for the plays of Shakespeare: given a word, return the text locations where it occurs (implementing and constructing an index data structure)

Predictive text generators

Simulating queues and theme park rides (priority queues, event-driven simulation)

Stack-based programming language interpreter (stacks, postfix arithmetic, simple lexical analysis)

Generating mazes by building spanning trees (graphs, greedy algorithms)

Spellchecking (using dynamic programming for edit distances)

Writing an interpreter is hard but will tie a lot of things together (lexical analysis, recursive parsing, trees, tree traversals)

I also second the recommendation for coding a simple game like Tic-Tac-Toe or Nim and writing a search-based AI opponent. Great for developing proficiency with recursion.

1 comments

Awesome. Thanks for mentioning related algorithms too. It will be good if we build some github repo for this kind of listing.