7 kyu
Club Doorman
1,199 of 1,876brudolce
Description:
INTRODUCTION
The Club Doorman will give you a word. To gain access, you need to provide the right number according to the given word.
Each word contains exactly one pair of consecutive identical letters, such as the tt
in lettuce
.
To determine the number, find the position of the repeated letter in the alphabet (where a
is 1
, b
is 2
, ..., z
is 26
) and multiply it by 3
.
TASK
Implement a function that takes a word as input and returns the correct number.
EXAMPLE
For the word lettuce
, the repeated letter is t
, which is the 20th
letter in the alphabet.
The correct answer is 20 × 3 = 60
.
NOTE
You may assume that the given string will
always contain exactly one pair of consecutive identical letters.
consist only of lowercase English letters.
Fundamentals
Similar Kata:
Stats:
Created | Feb 3, 2019 |
Published | Feb 3, 2019 |
Warriors Trained | 2542 |
Total Skips | 17 |
Total Code Submissions | 4733 |
Total Times Completed | 1876 |
JavaScript Completions | 1199 |
Julia Completions | 21 |
Python Completions | 696 |
Total Stars | 18 |
% of votes with a positive feedback rating | 92% of 384 |
Total "Very Satisfied" Votes | 328 |
Total "Somewhat Satisfied" Votes | 51 |
Total "Not Satisfied" Votes | 5 |
Total Rank Assessments | 27 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |