Just a dump of unrefactored code I wrote for Harvard's "CS50's Introduction to Computer Science" course.
Might be useful to someone struggling with tougher problem sets, though I am sure my solution in several cases is far from being the most optimal, so you better search for comprehensive tutorials for your specific problem.