Word Score
In Scrabble, each letter has its own point value, so a word’s total score is the sum of its letter scores. The function score receives a word word and calculates its Scrabble score. Letter case does not matter, so lowercase and uppercase letters should be scored the same way.
Примеры
Ввод
"a"Вывод
1Ввод
"cabbage"Вывод
14Ввод
"quirky"Вывод
22Нужно реализовать
def score(word: str) -> int:
Теги
stringsdict
Logga in för att se historik över inskick
Logga inLogga in för att använda AI-mentorn
Logga inVisible tests
1
Input
"a"Expected
12
Input
"cabbage"Expected
143
Input
"quirky"Expected
224
Input
"OxyphenButazone"Expected
415
Input
""Expected
06
Input
"!"Expected
0Focus radio
Paused · SomaFM · Fluid