leetle

Daily challenge for 2025-06-20

171. Count Character Types

Write a function solve that counts different types of characters in a string. Return a dictionary/object with counts for: vowels, consonants, digits, and spaces.

Example:
Input: "Hello World 123"
Output: {"vowels": 3, "consonants": 7, "digits": 3, "spaces": 2}

Note: Vowels are a, e, i, o, u (case insensitive).

Run this challenge interactively in Python or JavaScript when the app loads.