diff options
Diffstat (limited to 'challenge-258/luca-ferrari/python/ch-1.py')
| -rw-r--r-- | challenge-258/luca-ferrari/python/ch-1.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/challenge-258/luca-ferrari/python/ch-1.py b/challenge-258/luca-ferrari/python/ch-1.py new file mode 100644 index 0000000000..4ba789cf54 --- /dev/null +++ b/challenge-258/luca-ferrari/python/ch-1.py @@ -0,0 +1,25 @@ +#!python + +# +# Perl Weekly Challenge 258 +# Task 1 +# +# See <https://perlweeklychallenge.org/blog/perl-weekly-challenge-258> +# + +import sys + +# task implementation +# the return value will be printed +def task_1( args ): + sum = 0 + for n in args: + if len( n ) % 2 == 0: + sum += 1 + + return sum + + +# invoke the main without the command itself +if __name__ == '__main__': + print( task_1( sys.argv[ 1: ] ) ) |
