Letter frequency: Difference between revisions
Content added Content deleted
Line 431: | Line 431: | ||
return freqs; |
return freqs; |
||
}</lang> |
}</lang> |
||
=={{header|K}}== |
|||
<lang K>+(?a;#:'=a:,/0:`)</lang> |
|||
Example: The file "hello.txt" contains the string "Hello, world!" |
|||
<lang K> |
|||
c:+(?a;#:'=a:,/0:`hello.txt) |
|||
</lang> |
|||
Output: |
|||
<lang K> |
|||
(("H";1) |
|||
("e";1) |
|||
("l";3) |
|||
("o";2) |
|||
(",";1) |
|||
(" ";1) |
|||
("w";1) |
|||
("r";1) |
|||
("d";1) |
|||
("!";1)) |
|||
</lang> |
|||
=={{header|Liberty BASIC}}== |
=={{header|Liberty BASIC}}== |
||
Un-rem a line to convert to all-upper-case. Letter freq'y is printed as percentages. |
Un-rem a line to convert to all-upper-case. Letter freq'y is printed as percentages. |