Ben, > Write a function that that uses X and Y techniques.
> I realise teachers have to test mastery of certain > techniques, but they seem to lack the imagination. To be fair to teachers, its often the students who lack imagination. If you pose the problem as write an application to count the numbers of each letter in a paragraph of text or whatever many students will not make the connection to the technique that they are supposed to be using. Or they get so involved in the sub problem of creating/reading the paragraph of text that they don't spend time on the counting problem. A an example I have seen a solution to the above problem that used multiple loops to create a list of unique words. It then iterated over that list counting the occurences of each unique word. This solution required 2 loops overv the text for every unique word. Iyt worked but was horribly slow and the student made no use of the dictionaries that we had just spent a lecture learning about (this was in an awk class not Python...). > Especially with modern languagues like Python, where > you can write a whole program that actually does > something usefull using only a few lines of code it OTOH I do agree that the tasks could be at least a bit more interesting. Even if the technique to be used was prescribed or mandated. Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor