Course of Raku / Essentials / Associative data types / Exercises

Country codes

Problem

You have a list of two-letter country codes in the array:

my @codes = < FR IT DE EE LV US CN IN BR >;

Complete the program to print the full names of these countries, one per line. Use the file cc.raku with the hash that maps country codes to the names.

Example

The program’s output is shown below. Only a few first names are shown:

$ raku country-codes.raku
France
Italy
Germany
. . .

Solution

See the solution

Course navigation

Solution: Seen before?   |   Solution: Country codes

Translations of this page: EnglishDeutschEspañolItalianoLatviešuNederlandsБългарскиРусскийУкраїнська