Prime words: Difference between revisions
→{{header|Raku}}: add some comments to separate the task from the variants
Thundergnat (talk | contribs) (→{{header|Raku}}: add some comments to separate the task from the variants) |
|||
Line 271:
sub display ($n, @n, $s = "First 20: ") {"$n;\n{$s}{@n.join: ', '}"}
# The task
say 'Number of words whose ords are all prime: ',
@words.hyper.grep({
# Twelve other minor variants
say "\nNumber of words whose ordinal sum is prime: ",
@words.grep({ .
say "\nNumber of words whose ords are all prime, and whose ordinal sum is prime: ",
@words.hyper.grep({
say "\n\nInterpreting the words as if they were base 36 numbers:";
|