Loading...

The Letter Census

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 text analysis service needs to profile user-submitted content by counting vowels and consonants separately for readability scoring. Write a function that takes a string and returns a dict with keys 'vowels' and 'consonants' containing their respective counts. Ignore non-alpha characters.

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.