Problem 42. Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ... z=26. Assume the input will be a single word, although it may mixed case. Note that A=a=1 and B=b=2.
So
s = 'hello'
means
p = 8 * 5 * 12 * 12 * 15 = 86400
Bonus question: How close can you get to a word product of one million?
Solution Stats
Problem Comments
-
9 Comments
Show
6 older comments
Maryam HCTRAK Yousef
on 29 Aug 2020
Nice problem
A C
on 15 Dec 2020
Can you give me a hint on how to program the bonus question? I used factor but that is not a good way.
Joel Hottinger
on 8 Jul 2021
If we can include multiple words in our bonus answer, the word "tea" 3 times scores perfect. n = 'teateatea'
Solution Comments
Show commentsProblem Recent Solvers3374
Suggested Problems
-
Swap the first and last columns
21043 Solvers
-
1628 Solvers
-
386 Solvers
-
14470 Solvers
-
There are 10 types of people in the world
1151 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!