The Weekly Challenge - 311

Sunday, Mar 2, 2025| 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: Upper Lower

10. TASK #2: Group Digit Sum


HEADLINES


Welcome to the Week #311 of The Weekly Challenge.

Today is the first Monday of the Month and time to declare the next champion.

With great pride, I announce Peter Campbell Smith the next champion. He was last declared champion in Dec 2021. Congratulation Peter. Thank you for your valuable contributions.


Last 5 weeks mainstream contribution stats. Thank you Team PWC for your support and encouragements.

  Week      Perl       Raku       Blog   
   306       39       18       10   
   307       44       20       12   
   308       44       22       16   
   309       50       21       19   
   310       42       19       13   

Last 5 weeks guest contribution stats. Thank you each and every guest contributors for your time and efforts.

  Week      Guests       Contributions       Languages   
   306       9       40       15   
   307       15       61       23   
   308       14       56       21   
   309       13       56       21   
   310       11       44       16   

TOP 10 Guest Languages


Do you see your favourite language in the Top #10? If not then why not contribute regularly and make it to the top.

 1. Python     (3227)
 2. Rust       (856)
 3. Ruby       (775)
 4. Haskell    (751)
 5. Lua        (692)
 6. C++        (593)
 7. C          (590)
 8. JavaScript (538)
 9. Go         (462)
10. BQN        (418)

Blogs with Creative Title


1. Arrays Intersect in Odd Ways by Adam Russell.

2. Intersection Sort by Arne Sommer.

3. Odd Sets by Jorg Sommrey.

4. Make it even by Matthias Muth.

5. Arrays and arrays by Peter Campbell Smith.

6. Odd Arrays by Roger Bell_West.


GitHub Repository Stats


1. Commits: 42,508 (+94)

2. Pull Requests: 11,641 (+35)

3. Contributors: 257

4. Fork: 323

5. Stars: 186



With start of Week #268, we have a new sponsor Lance Wicks until the end of year 2025. Having said we are looking for more sponsors so that we can go back to weekly winner. If anyone interested please get in touch with us at perlweeklychallenge@yahoo.com. Thanks for your support in advance.


RECAP


Quick recap of The Weekly Challenge - 310 by Mohammad Sajid Anwar.


PERL REVIEW


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


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 check out the guest contributions for the Week #310.

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


Task 1: Upper Lower

Submitted by: Mohammad Sajid Anwar

You are given a string consists of english letters only.

Write a script to convert lower case to upper and upper case to lower in the given string.

Example 1

Input: $str = "pERl"
Output: "PerL"

Example 2

Input: $str = "rakU"
Output: "RAKu"

Example 3

Input: $str = "PyThOn"
Output: "pYtHoN"

Task 2: Group Digit Sum

Submitted by: Mohammad Sajid Anwar

You are given a string, $str, made up of digits, and an integer, $int, which is less than the length of the given string.

Write a script to divide the given string into consecutive groups of size $int (plus one for leftovers if any). Then sum the digits of each group, and concatenate all group sums to create a new string. If the length of the new string is less than or equal to the given integer then return the new string, otherwise continue the process.

Example 1

Input: $str = "111122333", $int = 3
Output: "359"

Step 1: "111", "122", "333" => "359"

Example 2

Input: $str = "1222312", $int = 2
Output: "76"

Step 1: "12", "22", "31", "2" => "3442"
Step 2: "34", "42" => "76"

Example 3

Input: $str = "100012121001", $int = 4
Output: "162"

Step 1: "1000", "1212", "1001" => "162"


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


SO WHAT DO YOU THINK ?

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

Contact with me