15 Exercises to Know A Programming Language
- From: Martin <martin.clausen@xxxxxxxxx>
- Date: Tue, 03 Jul 2007 09:58:16 -0000
I am trying to improve my Python skills through some exercises.
Currently I am working on Larry's "15 exercises to know a programming
language " (http://www.knowing.net/
PermaLink,guid,f3b9ba36-848e-43f8-9caa-232ec216192d.aspx). The first
exercise is this:
"Write a program that takes as its first argument one of the words
'sum,' 'product,' 'mean,' or 'sqrt' and for further arguments a
series of numbers. The program applies the appropriate function to
the series."
My solution so far is this:
http://dpaste.com/13469/
I would really like some feedback. Is this a good solution? is it
efficient? robust? what could be improved? any not looking for a
revised solution, hints on what to improve are also very welcome.
Martin
.
- Follow-Ups:
- Re: 15 Exercises to Know A Programming Language
- From: John Machin
- Re: 15 Exercises to Know A Programming Language
- From: Marc 'BlackJack' Rintsch
- Re: 15 Exercises to Know A Programming Language
- Prev by Date: Re: Bug in Python class static variable?
- Next by Date: Re: need help with win32com
- Previous by thread: Python 2.5 from source without tcl/tk
- Next by thread: Re: 15 Exercises to Know A Programming Language
- Index(es):
Relevant Pages
|