Sha256: 0079e23d670ebf2e19bac2fcbf70e682bd9742edf9d8689d0399ba1fa4ed4ab0
Contents?: true
Size: 747 Bytes
Versions: 82
Compression:
Stored size: 747 Bytes
Contents
exercise: Scrabble version: 1 plan: 13 imports: '&score' tests: | is .<input>.&score, |.<expected description> for @($c-data<cases>); unit: module example: | sub score (Str:D $word --> Int:D) is export { my $score = 0; for $word.lc.split('',:skip-empty) -> $letter { given $letter { when * ~~ /<[aeioulnrst]>/ { $score += 1 } when * ~~ /<[dg]>/ { $score += 2 } when * ~~ /<[bcmp]>/ { $score += 3 } when * ~~ /<[fhvwy]>/ { $score += 4 } when * ~~ /k/ { $score += 5 } when * ~~ /<[jx]>/ { $score += 8 } when * ~~ /<[qz]>/ { $score += 10 } } } return $score; } stub: | sub score ($word) is export { }
Version data entries
82 entries across 82 versions & 1 rubygems
Version | Path |
---|---|
trackler-2.1.0.36 | tracks/perl6/exercises/scrabble-score/example.yaml |
trackler-2.1.0.34 | tracks/perl6/exercises/scrabble-score/example.yaml |