#Paper and pencil: Figure out the value of letters by sum of words.
Description:
Story
In 22022, a disaster wiped out human beings. A team of alien archaeologists wanted to find out more about languages of human beings. However, when it comes to English, they only see letters with numbers. You are the leader of this group, with your master-alien-mind, you figured out the numbers mean the sum of words, now you just have to figure out the value of each number!
Task
Write a function with a string parameter, consisting of ONLY lowercase letters, and seperated by spaces. Use the test cases to figure out what each lowercase value represents, and return the sum of the words in list/tuple (depending on language). The letters represent values from 1-26.
Input
a string of words, seperated by spaces.
Output
A list/tuple representing the sum of words.
Example
"i am fine thank you" ---> [24, 32, 73, 61, 32]
Precondition
number of tests = 160
30<=number of words<=60
2<=length of words<=20
Notes
- the alphabets' values are not in the alphabetical order.
- any translations will be appreciated!
- You can definitely solve the value of each word in example test cases, it's guaranteened.
- Only try to solve this kata when you have at least 1 hour of time
Similar Kata:
Stats:
Created | Dec 17, 2022 |
Published | Dec 17, 2022 |
Warriors Trained | 560 |
Total Skips | 28 |
Total Code Submissions | 611 |
Total Times Completed | 229 |
Python Completions | 185 |
C Completions | 51 |
Total Stars | 13 |
% of votes with a positive feedback rating | 95% of 61 |
Total "Very Satisfied" Votes | 57 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 16 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |