BuildlyBuildly
DashboardExercisesProfileHelp
Back to all

Practice: Dictionaries

Drills tagged with this skill, unpassed first. Pass them all to mark the skill ready for scenarios.

Module 1: Python Programming

0/3 done
Exercises (0/3)
  • 1
    Merge Vote Counts
    Write merge_counts(a, b) that takes two dicts of name → count and returns a new dict where each name's count is the sum across both inputs.
    5 min· 10 XP
  • 2
    Key With Highest Value
    Write top_key(d) that returns the key whose value is the largest. If d is empty, return None. If there's a tie, returning any one of the tied keys is fine.
    5 min· 10 XP
  • 3
    Letter Frequency
    Write letter_frequency(s) that returns a dict mapping each lowercase letter in s to how many times it appears. Treat s case-insensitively.
    5 min· 10 XP