Write real code. Get real feedback.

Codetail is where developers practice with sandboxed execution, AI code review, and problems pulled from real production patterns, not toy exercises.

Python Fundamentals/Dicts
Share2 / 12Next

Word Frequency

easyWrite CodeBuilding Dicts

Scenario

A search analytics pipeline counts how often each term appears in a query log before ranking results by popularity.

Constraints

  • Preserve case, "Go" and "go" are different words
  • Return an empty dict for an empty list

Function signature

defword_frequency(words: list) -> dict:

Example 1

Input: words = ["go", "python", "go", "rust"]

Output: {"go": 2, "python": 1, "rust": 1}

"go" appears twice, others once.

Python main.py

Test Cases

·

Test 1

Input: ["go","python","go","rust"]

Expected: {"go":2,"python":1,"rust":1}

·

Test 2

Input: []

Expected: {}

·

Test 3

Input: ["django"]

Expected: {"django":1}

·

Test 4

Input: ["a","b","a","c","b","a"]

Expected: {"a":3,"b":2,"c":1}

·

Test 5

Input: ["x","y","z"]

Expected: {"x":1,"y":1,"z":1}

·

Test 6

Input: ["ok","ok"]

Expected: {"ok":2}

Four systems, one learning loop.

Codetail brings AI review, sandboxed execution, structured paths and progress tracking into one place, built around how developers actually practice.

A.

AI code review

Django, FastAPI, SQL and Go submissions get scored against a real rubric and reviewed by AI, not just checked for pass or fail.

AI Code ReviewReviewed just now
0

Clean structure and clear naming, but the empty-list edge case is not explicitly handled.

Correctness90
Design82
Clarity88
Efficiency74
Correct on all provided examples
Missing type hints on the return value
B.

Sandboxed execution

Write and fix Python in an isolated subprocess. Every test case runs for real against your code, no simulated output.

sandbox · python3

$ python3 -m pytest main.py

test_basic_counts PASSED
test_empty_input PASSED
test_case_sensitivity PASSED
6 passed, 0 failed42ms

$

C.

Structured learning paths

Problems organized by stack and difficulty, from fundamentals to production patterns, so you always know what's next.

In progress
64

Python Fundamentals

8 of 12 problems

20

Django ORM Patterns

2 of 10 problems

0

SQL Window Functions

Not started

D.

XP, streaks and badges

Earn XP on every first solve, build a daily streak, and unlock badges as you progress through a path.

12 day streak

Longest streak: 18 days

M
T
W
T
F
S
S
0 XP 6 badges

Pricing

Simple, honest pricing

Start free. Premium trial included. No credit card required.

Free

$0forever

Get started with the basics

Get started
5 problems per path
3 AI reviews per day
2 AI hints per day
1 solution reveal per day
Unlimited code execution
Unlimited MCQs
Most Popular

Pro

$9/ month

or $90/year, save $18

Unlimited everything

Upgrade to Pro
All problems unlocked
Unlimited AI reviews
Unlimited AI hints
Unlimited solution reveals
AI-generated custom challenges
Daily practice emails
Full progress analytics
Priority support
14-day free trial

Premium

$19/ month

or $190/year, save $38

Pro plus career tools

Try Premium free

No credit card required

Everything in Pro
AI resume builder
PDF export (10 templates)
GitHub project import
Resume ATS analysis
Priority support

Ready to write real code?

Join developers practicing with sandboxed execution and AI review. Free to start, no credit card required.