[Python-il] Looking for a little educational project for a Python newbie

Imri Goldberg lorgandon at gmail.com
Mon Mar 1 01:59:51 IST 2010

My favorite first exercise for any language is "fnord". For Python it's
especially fun, because it's very easy to write.
The idea is simple:
construct sentences according to templates.
First version:
1. Given a list of verbs, nouns, adverbs and adjectives, construct sentences
of the form "The adjective noun adverb verb the adjective adjective noun".
(print them).
2. Read the lists of words from files
3. Also read a list of templates from a file.

I consider this a very good first exercise for any language because:
1. The algorithm is pretty simple, so you mostly practice the language
2. For programming beginners, the algorithm is still very much teaching
3. It covers a lot of the basic subjects: simple IO, file IO, string
processing, dictionaries, lists, "executable programs", etc..
4. It can be extended to teach basic testing using unittest and coverage.py.
5. It can be extended to teach networking.


On Sun, Feb 28, 2010 at 10:22 PM, cool-RR <cool-rr at cool-rr.com> wrote:

> Come on, that's just geek crap.
> On Sun, Feb 28, 2010 at 9:57 PM, Meir Kriheli <meir at mksoft.co.il> wrote:
>> On 02/28/2010 09:20 PM, cool-RR wrote:
>>> Hello,
>>> I am guiding my friend in learning Python. He's a past programmer in
>>> other languages, so I gave him Dive into Python. But he tells me he has
>>> a problem: He needs more actual exercise for his Python skills. I gave
>>> him the Project Euler exercises, which are pretty fun, but they're all
>>> about algorithms and he feels he already has that part under control.
>>> So I'm looking for a little educational project to give him to program.
>>> Not something of any practical use, it should just be something fun and
>>> cool that will let him use many different idioms of Python.
>>> Does anyone have a suggestion?
>>> --
>>> Sincerely,
>>> Ram Rachum
>> Try this:
>> http://www.pythonchallenge.com/
>> Cheers
>> --
>> Meir
> --
> Sincerely,
> Ram Rachum
> _______________________________________________
> Python-il mailing list
> Python-il at hamakor.org.il
> http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il

Imri Goldberg
http://plnnr.com/ - automatic trip planning
-- insert signature here ----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://hamakor.org.il/pipermail/python-il/attachments/20100301/cbf9f4a1/attachment.htm 

More information about the Python-il mailing list