Perl Weekly Challenge - 053

Monday, Mar 23, 2020| Tags: Perl, Raku


HEADLINES



In 2 days i.e. 25th March 2020, we would complete one year of weekly challenge. We would like to thank each and every contributors. We would also like to thanks Perl and Raku reviewers Kian-Meng Ang, Laurent Rosenfeld and Ryan Thompson for their support and encouragement. We would also like to thank our sole sponsor Peter Sergeant of PerlCareers for sponsoring the (weekly/monthly) winner.

We are looking for volunteer to help us with Raku Reviews. So far, Laurent Rosenfeld and Ryan Thompson have done brilliant job with quality reviews. Their reviews have been appreciated by each and every member of Team PWC. We would be grateful if you could help us with reviews. Please let us know if you would like to be part of the team of reviewers by dropping a line to perlweeklychallenge@yahoo.com.

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



RECAP



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



PERL REVIEW



Please checkout Perl solutions review of the “Perl Weekly Challenge - 050” by Ryan Thompson.

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



RAKU REVIEW



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



Richard Park joined as guest and contributed his solutions in APL.

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

Please give it a try to an excellent tool EZPWC created by respected member Saif Ahmed of Team PWC.



GUESTS



Lubos Kolouch shared solutions to Task #1 and Task #2 in Python.

Richard Park shared solutions to Task #1 and Task #2 in APL.

User Person shared solutions to Task #1 and Task #2 in Python.

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



TASK #1


Rotate Matrix


Write a script to rotate the followin matrix by given 90/180/270 degrees clockwise.

[ 1, 2, 3 ]
[ 4, 5, 6 ]
[ 7, 8, 9 ]

For example, if you rotate by 90 degrees then expected result should be like below

[ 7, 4, 1 ]
[ 8, 5, 2 ]
[ 9, 6, 3 ]


TASK #2



Vowel Strings

Write a script to accept an integer 1 <= N <= 5 that would print all possible strings of size N formed by using only vowels (a, e, i, o, u).

The string should follow the following rules:

  1. ‘a’ can only be followed by ‘e’ and ‘i’.

  2. ‘e’ can only be followed by ‘i’.

  3. ‘i’ can only be followed by ‘a’, ‘e’, ‘o’, and ‘u’.

  4. ‘o’ can only be followed by ‘a’ and ‘u’.

  5. ‘u’ can only be followed by ‘o’ and ‘e’.

For example, if the given integer N = 2 then script should print the following strings:

ae
ai
ei
ia
io
iu
ie
oa
ou
uo
ue


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



SO WHAT DO YOU THINK ?

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

Contact with me