Count how many vowels and consonants occur in a string: Difference between revisions
Content added Content deleted
(→{{header|Haskell}}: Updated output in second variant) |
(→{{header|Python}}: Updated output) |
||
Line 574: | Line 574: | ||
print(showCharCounts(vs)) |
print(showCharCounts(vs)) |
||
print(f'\n\t{nc} characters drawn from {len(cs)} consonants:') |
print(f'\n\t{nc} characters drawn from {len(cs)} consonants:') |
||
print(showCharCounts( |
print(showCharCounts(cs)) |
||
Line 648: | Line 648: | ||
21 characters drawn from 9 consonants: |
21 characters drawn from 9 consonants: |
||
(' |
('F', 2) |
||
(' |
('g', 4) |
||
(' |
('l', 1) |
||
(' |
('m', 2) |
||
(' |
('n', 3) |
||
('p', 1) |
|||
('r', 6) |
|||
('t', 1) |
|||
('v', 1)</pre> |
|||
=={{header|Raku}}== |
=={{header|Raku}}== |