The Weekly Challenge - 146

Monday, Jan 3, 2022| Tags: Perl, Raku

TABLE OF CONTENTS


01. HEADLINES

02. SPONSOR

03. RECAP

04. PERL REVIEW

05. RAKU REVIEW

06. CHART

07. NEW MEMBERS

08. GUESTS

09. TASK #1: 10001st Prime Number

10. TASK #2: Curious Fraction Tree


HEADLINES



Happy New Year

Let us welcome new year 2022 with the happy note as we declare the next champion. As per the tradition, we announce the champion on the first Monday of the month. So the next champion of The Weekly Challenge is Peter Campbell Smith. As of today, he has contributed 31 Perl solutions and 5 blogs. Technically, he is eligible to get the FREE T-shirt too. Congratulations Peter. Below is the complete breakdown of the contributions by Peter.


The Weekly Challenge - 024: Perl (1)
The Weekly Challenge - 124: Perl (1)
The Weekly Challenge - 125: Perl (1)
The Weekly Challenge - 128: Perl (1)
The Weekly Challenge - 129: Perl (1)
The Weekly Challenge - 130: Perl (2)
The Weekly Challenge - 131: Perl (2)
The Weekly Challenge - 133: Perl (2)
The Weekly Challenge - 134: Perl (2)
The Weekly Challenge - 135: Perl (2)
The Weekly Challenge - 138: Perl (2)
The Weekly Challenge - 139: Perl (2)
The Weekly Challenge - 140: Perl (2)
The Weekly Challenge - 141: Perl (2), Blog (1)
The Weekly Challenge - 142: Perl (2), Blog (1)
The Weekly Challenge - 143: Perl (2), Blog (1)
The Weekly Challenge - 144: Perl (2), Blog (1)
The Weekly Challenge - 145: Perl (2), Blog (1)

Start of the year, we have two new members joining the Team PWC. First is Moray Jones and the second is Mohammad Khalid Anwar. Did you notice the similarity between my name and Khalid? Well he is my younger brother from Pune, India. It took me so long to convince him to join the weekly challenge. I am glad he finally did join us. Moray shared solution in Raku whereas Khalid shared solutions in Perl and C++ in the first week.

Another interesting event happened last week. For the first time in the history of The Weekly Challenge, we received same guest contributions (89) as the Perl and Raku combined contributions (89). It is also the best week for guest contributions beating the previous best figure of 86 contributions in the Week #109. The biggest contributors are Abigail, Laurent Rosenfeld and Roger Bell_West.


Guest Contributors


Top 3 guest languages as of today are Python (783), Haskell (411) and Lua (265). We have one more language added to the list, Ring, introduced by Laurent Rosenfeld.


Guest Contributors


Regular Contributors


As of today, we have received contributions in Perl (7006), Raku (4212) and Blogs (2148).


Regular Contributors


Blogs with Creative Title


1. Palin’ Dot with Raku and Perl by Arne Sommer.

2. Products above Trees?: The Weekly Challenge #145 by Dave Jacoby

3. Perl Weekly Challenge 145: the last challenge of the year! by Luca Ferrari.

4. How to find palindromes quickly by Peter Campbell Smith.

5. The Weekly Challenge 145: Tree Product by Roger Bell_West.


GitHub Repository Stats


1. Commits: 22,360 (+135)

2. Pull Requests:5,450 (+34)

3. Contributors: 185 (+2)

4. Fork: 236 (+2)

5. Stars: 118



Our solo sponsor Pete Sergeant has been a great support to keep us motivated. We are lucky that he agreed to continue the journey with us in the year 2021. I would like to personally thank Pete and his entire team for their generosity. It would be great if we could add few more to sponsor the prize money so that we could go back and declare weekly champions as we have done in the past. I hope and wish this will become possible in 2021. The amount doesn’t have to be huge. However, it would be nice to show off bunch of supporters. If an organisation comes forward and supports us then that would be the ultimate achievement.


RECAP


Quick recap of “The Weekly Challenge - 145” by Mohammad S Anwar.


PERL REVIEW


Please check out Perl solutions review of the “The Weekly Challenge - 141” by Colin Crain.

If you missed any past reviews then please check out the collection.


RAKU REVIEW


If you missed any past reviews then please check out the collection.


CHART


Please take a look at the charts showing interesting data.

I would like to THANK every member of the team for their valuable suggestions. Please do share your experience with us.


NEW MEMBERS


1. Moray Jones, an experienced Raku hacker.

2. Mohammad Khalid Anwar, Perl enthusiasts and AWS expert from Pune, India.


Please find out How to contribute?, if you have any doubts.

Please try the excellent tool EZPWC created by respected member Saif Ahmed of Team PWC.


GUESTS


Please checkout the guest contributions for the Week #145.

Please find past solutions by respected guests. Please share your creative solutions in other languages.


TASK #1 › 10001st Prime Number

Submitted by: Mohammad S Anwar

Write a script to generate the 10001st prime number.


TASK #2 › Curious Fraction Tree

Submitted by: Mohammad S Anwar

Consider the following Curious Fraction Tree:


Curious Fraction Tree


You are given a fraction, member of the tree created similar to the above sample.

Write a script to find out the parent and grandparent of the given member.

Example 1:

    Input: $member = '3/5';
    Output: parent = '3/2' and grandparent = '1/2'

Example 2:

    Input: $member = '4/3';
    Output: parent = '1/3' and grandparent = '1/2'


Last date to submit the solution 23:59 (UK Time) Sunday 9th January 2022.


SO WHAT DO YOU THINK ?

If you have any suggestions or ideas then please do share with us.

Contact with me