Loading...

The Alphabet Score

A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
easy
Seniority
junior, mid

Problem

A game engine needs to compute string scores based on alphabetic position for a scoring system. Given a string, return the sum of each letter's position value where a=1, b=2 through z=26. Uppercase letters count the same as lowercase, and non-alphabetic characters contribute 0.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.