Loading...

The Word 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 analytics engine needs to rank the terms in a document by how frequently they appear. Given a string of space-separated words, return a dictionary of word frequencies sorted in descending order by count. Treat all words as lowercase.

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.