Perl Weekly Challenge - 023

Sunday, Aug 25, 2019| Tags: Perl, Raku


HEADLINES



With great pleasure, we announce Kian-Meng Ang as the winner of Perl Weekly Challenge - 022. Congratulations Kian-Meng, you should soon hear from Perl Careers about your reward. For rest of the participants, I would say Good Luck for next time. Keep sending in your solutions and share your knowledge with each other.



RECAP



Here is the recap of last week challenge.



PERL REVIEW



Please checkout Perl solutions review of the Perl Weekly Challenge - 021 by Kian-Meng Ang.



RAKU REVIEW



Please checkout Raku solutions review of the Perl Weekly Challenge - 021 by Laurent Rosenfeld.

Challenge #021

  1. Euler’s Number

  2. URL Normalization

He also reviewed past challenges as well.

Challenge #019

  1. Five Weekends in a Month

  2. Wrapping Lines

Challenge #018

  1. Longest Common Substrings

  2. Priority Queues and Binary Heaps



CHART



Please take a look at the charts showing interesting data.

I would like to thank everyone for their valuable suggestions. Please do share your experience with us. Good luck for the weekly challenge and enjoy.



NEW MEMBERS



  1. Yet Ebreo, an experienced Perl/Raku hacker from Philippines.

  2. Kiran Kumar, an experienced Perl hacker from Bangalore, India. He has been using Perl since 1999.

Check out current team members.



GUESTS



We welcome contributions in other languages. So far we have had one guest submitting solutions in Python in the past. Last week, we didn’t receive any contributions from guest.



Task #1



Create a script that prints nth order forward difference series. You should be a able to pass the list of numbers and order number as command line parameters. Let me show you with an example.

Suppose we have list (X) of numbers: 5, 9, 2, 8, 1, 6 and we would like to create 1st order forward difference series (Y). So using the formula Y(i) = X(i+1) - X(i), we get the following numbers: (9-5), (2-9), (8-2), (1-8), (6-1). In short, the final series would be: 4, -7, 6, -7, 5. If you noticed, it has one less number than the original series. Similary you can carry on 2nd order forward difference series like: (-7-4), (6+7), (-7-6), (5+7) => -11, 13, -13, 12.



Task #2



Create a script that prints Prime Decomposition of a given number. The prime decomposition of a number is defined as a list of prime numbers which when all multiplied together, are equal to that number. For example, the Prime decomposition of 228 is 2,2,3,19 as 228 = 2 * 2 * 3 * 19.



Task #3



Write a script to use Random Poems API. This is the easiset API, I have come across so far. You don’t need API key for this. They have only route to work with (GET). The API task is optional but we would love to see your solution.



Last date to submit the solution 23:59 (UK Time) Sunday 1st September 2019.



SO WHAT DO YOU THINK ?

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

Contact with me