Submitted by: Mohammad Sajid Anwar
You are given a given a string caption for a video.
Write a script to generate tag for the given string caption in three steps as mentioned below:
1. Format as camelCase
Starting with a lower-case letter and capitalising the first letter of each subsequent word.
Merge all words in the caption into a single string starting with a #.
2. Sanitise the String
Strip out all characters that are not English letters (a-z or A-Z).
3. Enforce Length
If the resulting string exceeds 100 characters, truncate it so it is
exactly 100 characters long.
Input: $caption = "Cooking with 5 ingredients!"
Output: "#cookingWithIngredients"
Input: $caption = "the-last-of-the-mohicans"
Output: "#thelastofthemohicans"
Input: $caption = " extra spaces here"
Output: "#extraSpacesHere"
Input: $caption = "iPhone 15 Pro Max Review"
Output: "#iphoneProMaxReview"
Input: $caption = "Ultimate 24-Hour Challenge: Living in a Smart Home controlled entirely by Artificial Intelligence and Voice Commands in the year 2026!"
Output: "#ultimateHourChallengeLivingInASmartHomeControlledEntirelyByArtificialIntelligenceAndVoiceCommandsIn"
Submitted by: Mohammad Sajid Anwar
You are given a string, group size and filler character.
Write a script to divide the string into groups of given size. In the last group if the string doesn't have enough characters remaining fill with the given filler character.
Input: $str = "RakuPerl", $size = 4, $filler = "*"
Output: ("Raku", "Perl")
Input: $str = "Python", $size = 5, $filler = "0"
Output: ("Pytho", "n0000")
Input: $str = "12345", $size = 3, $filler = "x"
Output: ("123", "45x")
Input: $str = "HelloWorld", $size = 3, $filler = "_"
Output: ("Hel", "loW", "orl", "d__")
Input: $str = "AI", $size = 5, $filler = "!"
Output: "AI!!!"
Last date to submit the solution 23:59 (UK Time) Sunday 19th Aprilh 2026.