Find the alphabetic word product - MATLAB Cody - MATLAB Central

Problem 42. Find the alphabetic word product

Difficulty:Rate

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

60.6% Correct | 39.4% Incorrect
Last Solution submitted on Mar 06, 2025

Problem Comments

Solution Comments

Show comments
Primes and Rough Numbers, Basic ideas
What is a rough number? What can they be used...
3
5

Problem Recent Solvers3372

Suggested Problems

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!
Go to top of page