Tuesday, February 3, 2009

Project Euler: a good source of programming problems

Project Euler might be a good source of programming problems for a CS1 course.
"Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems."
The project was started in 2001 and now has 230 problems. Each one has a short description and can be solved by a computer program that runs in a minute or less on a modest computer. Here's an example of one of the problems (#5):
"2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.What is the smallest number that is evenly divisible by all of the numbers from 1 to 20?"
The site shows statistics (if you register) that show the programming languages used by people who have submitted solutions. Python is second only to C/C++ in the ranking.

Monday, February 2, 2009

Berkeley online study guide for learning Python

Berkeley has resources for "self-paced" study, including a course on learning Python.

This uses the online version of How to think like a computer scientist and has programming assignments, sample quizzes and quizzes. I found the site to be very slow to serve up pages for some reason.

Sunday, February 1, 2009

Use emacs as your Python IDE

Committed emacs users might take a look at a post by Ryan McGuire, Emacs as a powerful Python IDE, where he suggests how to set up your emacs environment for python hacking.
"A lot of people, for whatever reason, don't feel that Emacs is an IDE at all. I don't personally care what you define it as — the fact remains — Emacs is a powerful Python environment and despite being over 32 years old has proven to be just as modern as any IDE today, and remains THE most configurable editor (operating system?) ever."
The key enablers seem to be Pymacs, Rope, and Ropemacs.