Perl Weekly Challenge - 043

Monday, Jan 13, 2020| Tags: Perl, Raku


HEADLINES



As you all know, Perl Careers has been the sole sponsor for the Weekly Champion through out the year 2019, we are very grateful to Perl Careers for the support. I have recently blogged (#1 and #2) with regard to attract more sponsors for the Weekly Champion. I will let you know as and when I hear any update in this regard.

In the year 2020, we decided to pick Monthly Champion, thanks to Perl Careers, once again for the support. We will pick one winner from all the contributors of the month. It will be announced on the first Monday of the following month. Therefore the winner of the January 2020 would be declared on February 3, 2020. All the best Team PWC.

We would go back to Weekly Champion as soon as we find more sponsors. I believe, we are all in it for the love of our favourite language Perl and Raku. Having said that, we all like to be rewarded with gifts and appreciations. If you know anyone who would be willing to sponsor the winner then please let us know.

We have had many request in the past and recently as well with regard to change the challenge launch day i.e. move from Monday to Saturday/Sunday. We tried to hold this request for one reason, since Saturday and Sunday are the only off day we have where we do most of the management task. If we move the challenge launch day to either Saturday or Sunday then that would put us under immense work load. However, after discussing with one of the team member, we decided to create new club called “Early Bird Club”. Any existing member or new member can join the club by sending us one line request email to perlweeklychallenge@yahoo.com. From next Sunday 19, 2017, all members of “Early Bird Club” would get an early email notification with regard to the following week challenge. Pull Request solutions from the “Early Bird Club” members can only be accepted after the official launch of the weekly challenge. However they are FREE to submit their solutions by email anytime.

Last but not the least, we woud like to thank each and every member for their support and encouragement.



RECAP



Quick recap of the “Perl Weekly Challenge - 042” by Mohammad S Anwar.



PERL REVIEW



Please checkout Perl solutions review of the “Perl Weekly Challenge - 041” by Mohammad S Anwar.

If you missed any past reviews then please checkout the collection.



RAKU REVIEW



Please checkout Raku solutions review of the “Perl Weekly Challenge - 041” by Laurent Rosenfeld.

If you missed any past reviews then please checkout 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



Cristina Heredia from Madrid, Spain, joined the team last week.

Check out current team members.

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



GUESTS



Burkhard Nickels shared solutions to Task #1 and Task #2 in Python.

Kivanc Yazan shared solutions to Task #1 and Task #2 in Python.

Wanderdoc shared solutions to Task #1 and Task #2 in R.

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



TASK #1



Olympic Rings

There are 5 rings in the Olympic Logo as shown below. They are color coded as in Blue, Black, Red, Yellow and Green.

Olympic Rings

We have allocated some numbers to these rings as below:

Blue: 8

Yellow: 7

Green: 5

Red: 9

The Black ring is empty currently. You are given the numbers 1, 2, 3, 4 and 6. Write a script to place these numbers in the rings so that the sum of numbers in each ring is exactly 11.


TASK #2



Self-descriptive Numbers

Contributed by Laurent Rosenfeld

Write a script to generate Self-descriptive Numbers in a given base.

In mathematics, a self-descriptive number is an integer m that in a given base b is b digits long in which each digit d at position n (the most significant digit being at position 0 and the least significant at position b - 1) counts how many instances of digit n are in m.

For example, if the given base is 10, then script should print 6210001000. For more information, please checkout wiki page.



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



SO WHAT DO YOU THINK ?

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

Contact with me