The Weekly Challenge
You don't have to be an expert
You are given a string $str consisting of lowercase English letters, and an integer $k. Write a script to convert a lowercase string into numbers using alphabet positions (a=1 … z=26), concatenate them to form an integer, then compute the sum of its digits repeatedly $k times, returning the final value.
You are given a sentence. Write a script to split the given sentence into space-separated tokens and count how many are valid words. A token is valid if it contains no digits, has at most one hyphen surrounded by lowercase letters, and at most one punctuation mark (!, ., ,) appearing only at the end.
SO WHAT DO YOU THINK ?
If you have any suggestions or ideas then please do share with us.
Contact with me