[Python-il] Looking for a little educational project for a Python newbie
guy keren
choo at actcom.co.il
Mon Mar 1 08:28:31 IST 2010
when i learned python, i went with what did it to me - ascii games.
after preparing the very basic functions to draw a char on a given X,Y
position - it was very easy to start writing a program that displays
scrolling banners (actually, i used simple carriage-return tricks here),
a jumping ball, hangman (using /usr/share/dict/linux.words for the
words, having to do file I/O for the word choosing and for the
high-score table), ping-pong, basketball and checkers (the last one
included AI to play the machine's part - and required doing benchmarking
of data structures, in order to make it possible for the machine to
calculate more steps).
--guy
cool-RR wrote:
> Sounds okay. I was hoping for something with a more sexy result, but if
> there are no other suggestions, I'll take it. Thanks.
>
> On Mon, Mar 1, 2010 at 1:59 AM, Imri Goldberg <lorgandon at gmail.com
> <mailto:lorgandon at gmail.com>> wrote:
>
> 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 itself.
> 2. For programming beginners, the algorithm is still very much
> teaching them.
> 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.
>
> Cheers,
> Imri
>
> On Sun, Feb 28, 2010 at 10:22 PM, cool-RR <cool-rr at cool-rr.com
> <mailto: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
> <mailto: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 <mailto:Python-il at hamakor.org.il>
> http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
>
>
>
>
> --
> Imri Goldberg
> --------------------------------------
> http://plnnr.com/ - automatic trip planning
> http://www.algorithm.co.il/blogs/
> --------------------------------------
> -- insert signature here ----
>
>
>
>
> --
> Sincerely,
> Ram Rachum
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Python-il mailing list
> Python-il at hamakor.org.il
> http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
More information about the Python-il
mailing list