← back to unit
Challenge
# searching advanced
How Many Letters Appear an Even Number of Times?
The wizard's spell only works if enough letters come in pairs. 🪄
You get a lowercase word. For each DIFFERENT letter in it, count its appearances; print how many different letters appear an even number of times.
Example:
Input: word = "hello"
Output: 1
Counting each different letter gives h=1, e=1, l=2, o=1 — only "l" has an even count.
💡 need a hint?
srch-even-letter-counts.py🔒 given lines are locked — write your code in between
loading...