diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2023-04-10 22:33:44 +0100 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2023-04-10 22:33:44 +0100 |
| commit | 35788e641c36167b978c0fe36eaf6bed4be26c71 (patch) | |
| tree | 26864b5681cd1b9e2f0eca682247abb346cb5038 | |
| parent | 0be0b82c9dcc3048f35175b0bcfd7024dc299c11 (diff) | |
| download | perlweeklychallenge-club-35788e641c36167b978c0fe36eaf6bed4be26c71.tar.gz perlweeklychallenge-club-35788e641c36167b978c0fe36eaf6bed4be26c71.tar.bz2 perlweeklychallenge-club-35788e641c36167b978c0fe36eaf6bed4be26c71.zip | |
- Added solutions by Mark Anderson.
- Added solutions by Robert DiCicco.
- Added solutions by Paulo Custodio.
| -rw-r--r-- | challenge-212/robert-dicicco/julia/ch-1.jl | 44 | ||||
| -rw-r--r-- | challenge-212/robert-dicicco/perl/ch-1.pl | 47 | ||||
| -rw-r--r-- | challenge-212/robert-dicicco/python/ch-1.py | 39 | ||||
| -rw-r--r-- | challenge-212/robert-dicicco/raku/ch-1.raku | 44 | ||||
| -rw-r--r-- | challenge-212/robert-dicicco/ruby/ch-1.rb | 40 | ||||
| -rw-r--r-- | stats/pwc-challenge-211.json | 661 | ||||
| -rw-r--r-- | stats/pwc-current.json | 650 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 48 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 1339 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 742 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 92 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 40 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 46 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 48 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 60 | ||||
| -rw-r--r-- | stats/pwc-summary-241-270.json | 102 | ||||
| -rw-r--r-- | stats/pwc-summary-271-300.json | 30 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 48 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 92 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 104 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 54 |
21 files changed, 2352 insertions, 2018 deletions
diff --git a/challenge-212/robert-dicicco/julia/ch-1.jl b/challenge-212/robert-dicicco/julia/ch-1.jl new file mode 100644 index 0000000000..92af76bb2a --- /dev/null +++ b/challenge-212/robert-dicicco/julia/ch-1.jl @@ -0,0 +1,44 @@ +#!/usr/bin/env julia +#= +--------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-04-10 +Challenge 212 Jumping Letters ( Julia ) +--------------------------------------- +=# + +using Printf + +word = "Perl" +jump = [2,22,19,9] + +#word = "Raku" +#jump = [24,4,7,17] + +alphabet = ["a","b","c","d","e","f","g","h","i","j", + "k","l","m","n","o","p","q","r","s","t", + "u","v","w","x","y","z"] + +@printf("Input: \$word = '%s' and @jump = %s\n", word, jump) + +@printf("Output :") + +for n in (1:4) + ndx = findfirst(isequal(lowercase(SubString(word, n, n))), alphabet) + ndx += jump[n] + n==0 ? print(uppercase(alphabet[ndx % 26])) : print(alphabet[ndx % 26]) +end + +#= +--------------------------------------- +SAMPLE OUTPUT +julia .\Jumping.jl +Input: $word = 'Perl' and @jump = [2, 22, 19, 9] +Output :raku + +julia .\Jumping.jl +Input: $word = 'Perl' and @jump = [2, 22, 19, 9] +Output :raku +--------------------------------------- +=# + diff --git a/challenge-212/robert-dicicco/perl/ch-1.pl b/challenge-212/robert-dicicco/perl/ch-1.pl new file mode 100644 index 0000000000..51fc2a7602 --- /dev/null +++ b/challenge-212/robert-dicicco/perl/ch-1.pl @@ -0,0 +1,47 @@ +#!/usr/bin/env perl +=begin pod +--------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-04-10 +Challenge 212 Jumping Letters ( Perl ) +--------------------------------------- +=cut +use strict; +use warnings; +use feature 'say'; +use List::MoreUtils qw(first_index); + +my $word = 'Perl'; +my @jump = (2,22,19,9); + +#my $word = 'Raku'; +#my @jump = (24,4,7,17); + + +my @alphabet = qw(a b c d e f g h i j k l m n o p q r s t u v w x y z); + +say "Input: \$word = $word and \@jump = (@jump)"; + +print "Output: "; + +for my $n (0..length($word) - 1) { + my $ch = lc(substr($word,$n,1)); + my $ndx = first_index { $_ eq $ch } @alphabet; + $ndx += $jump[$n]; + $n == 0 ? print uc(@alphabet[$ndx % 26]) : print @alphabet[$ndx % 26]; +} + +=begin pod +--------------------------------------- +SAMPLE OUTPUT +perl .\Jumping.pl +Input: $word = Perl and @jump = (2 22 19 9) +Output: Raku + +PS G:\Projects\Perl\Challenges> perl .\Jumping.pl +Input: $word = Raku and @jump = (24 4 7 17) +Output: Perl +--------------------------------------- +=cut + + diff --git a/challenge-212/robert-dicicco/python/ch-1.py b/challenge-212/robert-dicicco/python/ch-1.py new file mode 100644 index 0000000000..d462c6eed7 --- /dev/null +++ b/challenge-212/robert-dicicco/python/ch-1.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python +''' +--------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-04-10 +Challenge 212 Jumping Letters ( Python ) +--------------------------------------- +''' + +word = 'Perl' +jump = [2,22,19,9] + +#word = 'Raku' +#jump = [24,4,7,17] + +alphabet = ["a","b","c","d","e","f","g","h","i","j", + "k","l","m","n","o","p","q","r","s","t", + "u","v","w","x","y","z"] + +print(f"Input: $word = '{word}' and @jump = {jump}") + +print("Output: ",end="") + +for n in range(len(word)): + ndx = alphabet.index(word[n].lower()) + print(alphabet[ndx % 26].upper(),end="") if n==0 else print(alphabet[ndx % 26],end="") + +''' +--------------------------------------- +SAMPLE OUTPUT +python .\Jumping.py +Input: $word = 'Perl' and @jump = [2, 22, 19, 9] +Output: Perl + +PS G:\Projects\Perl\Challenges> python .\Jumping.py +Input: $word = 'Raku' and @jump = [24, 4, 7, 17] +Output: Raku +--------------------------------------- +''' diff --git a/challenge-212/robert-dicicco/raku/ch-1.raku b/challenge-212/robert-dicicco/raku/ch-1.raku new file mode 100644 index 0000000000..6232b56f00 --- /dev/null +++ b/challenge-212/robert-dicicco/raku/ch-1.raku @@ -0,0 +1,44 @@ +#!/usr/bin/env raku +#`{ +--------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-04-10 +Challenge 212 Jumping Letters ( Raku ) +--------------------------------------- +} + +my $word = 'Perl'; +my @jump = (2,22,19,9); + +#my $word = 'Raku'; +#my @jump = (24,4,7,17); + +my @alphabet = <a b c d e f g h i j k l m n o p q r s t u v w x y z>; + +say "Input: \$word = $word and \@jump = ",@jump; + +print "Output: "; + +for (0..^$word.chars) -> $n { + my $ndx = @alphabet.first(substr($word,$n,1).lc, :k); + $ndx += @jump[$n]; + $n == 0 ?? print @alphabet[$ndx % 26].uc !! print @alphabet[$ndx % 26]; +} + +#`{ +--------------------------------------- +SAMPLE OUTPUT +raku .\Jumping.rk +Input: $word = Perl and @jump = [2 22 19 9] +Output: Raku + +raku .\Jumping.rk +Input: $word = Raku and @jump = [24 4 7 17] +Output: Perl +--------------------------------------- +} + + + + + diff --git a/challenge-212/robert-dicicco/ruby/ch-1.rb b/challenge-212/robert-dicicco/ruby/ch-1.rb new file mode 100644 index 0000000000..fe006b8515 --- /dev/null +++ b/challenge-212/robert-dicicco/ruby/ch-1.rb @@ -0,0 +1,40 @@ +#!/usr/bin/env ruby +=begin +--------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-04-10 +Challenge 212 Jumping Letters ( Ruby ) +--------------------------------------- +=end + +word = 'Perl' +jump = [2,22,19,9] + +#word = 'Raku' +#jump = [24,4,7,17] + +alphabet = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] + +puts("Input: $word = #{word} and @jump = #{jump}") + +print("Output: ") + +for n in 0..word.length - 1 do + ndx = alphabet.index(word[n].downcase) + jump[n] + n == 0 ? (print alphabet[ndx % 26].upcase) : (print alphabet[ndx % 26]) +end + +=begin +--------------------------------------- +SAMPLE OUTPUT +ruby .\Jumping.rb +Input: $word = Perl and @jump = [2, 22, 19, 9] +Output: Raku + +ruby .\Jumping.rb +Input: $word = Raku and @jump = [24, 4, 7, 17] +Output: Perl +--------------------------------------- +=end + + diff --git a/stats/pwc-challenge-211.json b/stats/pwc-challenge-211.json new file mode 100644 index 0000000000..877fed214e --- /dev/null +++ b/stats/pwc-challenge-211.json @@ -0,0 +1,661 @@ +{ + "plotOptions" : { + "series" : { + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + }, + "borderWidth" : 0 + } + }, + "legend" : { + "enabled" : 0 + }, + "title" : { + "text" : "The Weekly Challenge - 211" + }, + "tooltip" : { + "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>", + "followPointer" : 1, + "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>" + }, + "drilldown" : { + "series" : [ + { + "id" : "Arne Sommer", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Arne Sommer" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Athanasius", + "id" : "Athanasius" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Avery Adams", + "id" : "Avery Adams" + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "BarrOff", + "id" : "BarrOff" + }, + { + "id" : "Bob Lied", + "name" : "Bob Lied", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Bruce Gray", + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Bruce Gray" + }, + { + "id" : "Carlos Oliveira", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Carlos Oliveira" + }, + { + "name" : "Cheok-Yin Fung", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Cheok-Yin Fung" + }, + { + "id" : "David Ferrone", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "David Ferrone" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "E. Choroba", + "id" : "E. Choroba" + }, + { + "id" : "Flavio Poletti", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 2 + ] + ], + "name" : "Flavio Poletti" + }, + { + "name" : "Jaldhar H. Vyas", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Jaldhar H. Vyas" + }, + { + "id" : "James Smith", + "name" : "James Smith", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Jan Krnavek", + "id" : "Jan Krnavek" + }, + { + "id" : "Jorg Sommrey", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Jorg Sommrey" + }, + { + "name" : "Laurent Rosenfeld", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Laurent Rosenfeld" + }, + { + "name" : "Leo Manfredi", + "data" : [ + [ + "Perl", + 1 + ] + ], + "id" : "Leo Manfredi" + }, + { + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 6 + ] + ], + "name" : "Luca Ferrari", + "id" : "Luca Ferrari" + }, + { + "data" : [ + [ + "Perl", + 1 + ] + ], + "name" : "Mariano Spadaccini", + "id" : "Mariano Spadaccini" + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Mark Anderson", + "id" : "Mark Anderson" + }, + { + "id" : "Matthew Neleigh", + "data" : [ + [ + "Perl", + 1 + ] + ], + "name" : "Matthew Neleigh" + }, + { + "name" : "Matthias Muth", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Matthias Muth" + }, + { + "name" : "Paulo Custodio", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Paulo Custodio" + }, + { + "id" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "name" : "Peter Meszaros", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Peter Meszaros" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Pip Stuart", + "id" : "Pip Stuart" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Robbie Hatley", + "id" : "Robbie Hatley" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Robert DiCicco", + "id" : "Robert DiCicco" + }, + { + "id" : "Robert Ransbottom", + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Robert Ransbottom" + }, + { + "id" : "Roger Bell_West", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Roger Bell_West" + }, + { + "id" : "Simon Green", + "name" : "Simon Green", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Solathian", + "name" : "Solathian", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "id" : "Thomas Kohler", + "name" : "Thomas Kohler", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 1 + ] + ], + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke" + }, + { + "id" : "W. Luis Mochan", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "W. Luis Mochan" + } + ] + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "series" : [ + { + "data" : [ + { + "y" : 3, + "name" : "Arne Sommer", + "drilldown" : "Arne Sommer" + }, + { + "drilldown" : "Athanasius", + "y" : 4, + "name" : "Athanasius" + }, + { + "name" : "Avery Adams", + "y" : 3, + "drilldown" : "Avery Adams" + }, + { + "y" : 2, + "name" : "BarrOff", + "drilldown" : "BarrOff" + }, + { + "name" : "Bob Lied", + "y" : 3, + "drilldown" : "Bob Lied" + }, + { + "drilldown" : "Bruce Gray", + "name" : "Bruce Gray", + "y" : 2 + }, + { + "drilldown" : "Carlos Oliveira", + "y" : 2, + "name" : "Carlos Oliveira" + }, + { + "drilldown" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung", + "y" : 2 + }, + { + "drilldown" : "David Ferrone", + "name" : "David Ferrone", + "y" : 2 + }, + { + "drilldown" : "E. Choroba", + "name" : "E. Choroba", + "y" : 2 + }, + { + "drilldown" : "Flavio Poletti", + "y" : 6, + "name" : "Flavio Poletti" + }, + { + "drilldown" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas", + "y" : 5 + }, + { + "drilldown" : "James Smith", + "name" : "James Smith", + "y" : 3 + }, + { + "y" : 2, + "name" : "Jan Krnavek", + "drilldown" : "Jan Krnavek" + }, + { + "drilldown" : "Jorg Sommrey", + "y" : 2, + "name" : "Jorg Sommrey" + }, + { + "drilldown" : "Laurent Rosenfeld", + "y" : 5, + "name" : "Laurent Rosenfeld" + }, + { + "name" : "Leo Manfredi", + "y" : 1, + "drilldown" : "Leo Manfredi" + }, + { + "drilldown" : "Luca Ferrari", + "name" : "Luca Ferrari", + "y" : 8 + }, + { + "drilldown" : "Mariano Spadaccini", + "name" : "Mariano Spadaccini", + "y" : 1 + }, + { + "drilldown" : "Mark Anderson", + "name" : "Mark Anderson", + "y" : 2 + }, + { + "y" : 1, + "name" : "Matthew Neleigh", + "drilldown" : "Matthew Neleigh" + }, + { + "name" : "Matthias Muth", + "y" : 2, + "drilldown" : "Matthias Muth" + }, + { + "name" : "Paulo Custodio", + "y" : 2, + "drilldown" : "Paulo Custodio" + }, + { + "y" : 3, + "name" : "Peter Campbell Smith", + "drilldown" : "Peter Campbell Smith" + }, + { + "y" : 2, + "name" : "Peter Meszaros", + "drilldown" : "Peter Meszaros" + }, + { + "y" : 4, + "name" : "Pip Stuart", + "drilldown" : "Pip Stuart" + }, + { + "drilldown" : "Robbie Hatley", + "name" : "Robbie Hatley", + "y" : 3 + }, + { + "y" : 4, + "name" : "Robert DiCicco", + "drilldown" : "Robert DiCicco" + }, + { + "y" : 2, + "name" : "Robert Ransbottom", + "drilldown" : "Robert Ransbottom" + }, + { + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West", + "y" : 5 + }, + { + "y" : 3, + "name" : "Simon Green", + "drilldown" : "Simon Green" + }, + { + "name" : "Solathian", + "y" : 2, + "drilldown" : "Solathian" + }, + { + "y" : 4, + "name" : "Thomas Kohler", + "drilldown" : "Thomas Kohler" + }, + { + "drilldown" : "Ulrich Rieke", + "name" : "Ulrich Rieke", + "y" : 3 + }, + { + "name" : "W. Luis Mochan", + "y" : 3, + "drilldown" : "W. Luis Mochan" + } + ], + "name" : "The Weekly Challenge - 211", + "colorByPoint" : 1 + } + ], + "chart" : { + "type" : "column" + }, + "xAxis" : { + "type" : "category" + }, + "subtitle" : { + "text" : "[Champions: 35] Last updated at 2023-04-10 21:19:19 GMT" + } +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index fadbd623f9..abdd7229f8 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,187 +1,7 @@ { - "series" : [ - { - "name" : "The Weekly Challenge - 211", - "colorByPoint" : 1, - "data" : [ - { - "drilldown" : "Arne Sommer", - "name" : "Arne Sommer", - "y" : 3 - }, - { - "drilldown" : "Athanasius", - "name" : "Athanasius", - "y" : 4 - }, - { - "y" : 3, - "drilldown" : "Avery Adams", - "name" : "Avery Adams" - }, - { - "name" : "BarrOff", - "drilldown" : "BarrOff", - "y" : 2 - }, - { - "drilldown" : "Bob Lied", - "name" : "Bob Lied", - "y" : 3 - }, - { - "y" : 2, - "name" : "Bruce Gray", - "drilldown" : "Bruce Gray" - }, - { - "drilldown" : "Carlos Oliveira", - "name" : "Carlos Oliveira", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "Cheok-Yin Fung", - "name" : "Cheok-Yin Fung" - }, - { - "y" : 2, - "name" : "David Ferrone", - "drilldown" : "David Ferrone" - }, - { - "y" : 2, - "drilldown" : "E. Choroba", - "name" : "E. Choroba" - }, - { - "name" : "Flavio Poletti", - "drilldown" : "Flavio Poletti", - "y" : 6 - }, - { - "y" : 5, - "name" : "Jaldhar H. Vyas", - "drilldown" : "Jaldhar H. Vyas" - }, - { - "drilldown" : "James Smith", - "name" : "James Smith", - "y" : 3 - }, - { - "y" : 2, - "drilldown" : "Jan Krnavek", - "name" : "Jan Krnavek" - }, - { - "y" : 2, - "drilldown" : "Jorg Sommrey", - "name" : "Jorg Sommrey" - }, - { - "drilldown" : "Laurent Rosenfeld", - "name" : "Laurent Rosenfeld", - "y" : 5 - }, - { - "y" : 1, - "drilldown" : "Leo Manfredi", - "name" : "Leo Manfredi" - }, - { - "name" : "Luca Ferrari", - "drilldown" : "Luca Ferrari", - "y" : 8 - }, - { - "name" : "Mariano Spadaccini", - "drilldown" : "Mariano Spadaccini", - "y" : 1 - }, - { - "y" : 2, - "name" : "Mark Anderson", - "drilldown" : "Mark Anderson" - }, - { - "name" : "Matthew Neleigh", - "drilldown" : "Matthew Neleigh", - "y" : 1 - }, - { - "drilldown" : "Matthias Muth", - "name" : "Matthias Muth", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "Paulo Custodio", - "name" : "Paulo Custodio" - }, - { - "y" : 3, - "drilldown" : "Peter Campbell Smith", - "name" : "Peter Campbell Smith" - }, - { - "drilldown" : "Peter Meszaros", - "name" : "Peter Meszaros", - "y" : 2 - }, |
