File size: 4,007 Bytes
fca0078
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
COUNTRY_CAPITALS = [
    ("France", "Paris"),
    ("Japan", "Tokyo"),
    ("Egypt", "Cairo"),
    ("Italy", "Rome"),
    ("Spain", "Madrid"),
    ("Germany", "Berlin"),
    ("Kenya", "Nairobi"),
    ("Peru", "Lima"),
    ("Canada", "Ottawa"),
    ("Norway", "Oslo"),
    ("Greece", "Athens"),
    ("Turkey", "Ankara"),
    ("Chile", "Santiago"),
    ("Cuba", "Havana"),
    ("Iran", "Tehran"),
    ("Iraq", "Baghdad"),
    ("Ireland", "Dublin"),
    ("Portugal", "Lisbon"),
    ("Austria", "Vienna"),
    ("Hungary", "Budapest"),
    ("Poland", "Warsaw"),
    ("Sweden", "Stockholm"),
    ("Finland", "Helsinki"),
    ("Denmark", "Copenhagen"),
    ("Thailand", "Bangkok"),
    ("Vietnam", "Hanoi"),
    ("Nepal", "Kathmandu"),
    ("Jordan", "Amman"),
    ("Lebanon", "Beirut"),
    ("Morocco", "Rabat"),
    ("Ghana", "Accra"),
    ("Senegal", "Dakar"),
    ("Ethiopia", "Addis Ababa"),
    ("Uganda", "Kampala"),
    ("Zambia", "Lusaka"),
    ("Argentina", "Buenos Aires"),
    ("Colombia", "Bogota"),
    ("Venezuela", "Caracas"),
    ("Ecuador", "Quito"),
    ("Uruguay", "Montevideo"),
]

ANTONYMS = [
    ("hot", "cold"),
    ("big", "small"),
    ("fast", "slow"),
    ("up", "down"),
    ("open", "closed"),
    ("light", "dark"),
    ("early", "late"),
    ("rich", "poor"),
    ("strong", "weak"),
    ("full", "empty"),
    ("wet", "dry"),
    ("hard", "soft"),
    ("high", "low"),
    ("long", "short"),
    ("loud", "quiet"),
    ("happy", "sad"),
    ("young", "old"),
    ("clean", "dirty"),
    ("thick", "thin"),
    ("near", "far"),
    ("sweet", "sour"),
    ("heavy", "light"),
    ("wide", "narrow"),
    ("deep", "shallow"),
    ("sharp", "dull"),
    ("brave", "cowardly"),
    ("cheap", "expensive"),
    ("smooth", "rough"),
    ("tight", "loose"),
    ("true", "false"),
    ("begin", "end"),
    ("buy", "sell"),
    ("push", "pull"),
    ("win", "lose"),
    ("give", "take"),
    ("love", "hate"),
    ("accept", "refuse"),
    ("arrive", "depart"),
    ("remember", "forget"),
    ("laugh", "cry"),
]

UPPERCASE_WORDS = [
    "river",
    "mountain",
    "library",
    "pyramid",
    "desert",
    "harbour",
    "village",
    "castle",
    "garden",
    "forest",
    "bridge",
    "island",
    "temple",
    "market",
    "palace",
    "valley",
    "canyon",
    "glacier",
    "meadow",
    "orchard",
    "lantern",
    "compass",
    "anchor",
    "ladder",
    "window",
    "mirror",
    "candle",
    "basket",
    "pillow",
    "blanket",
    "piano",
    "violin",
    "trumpet",
    "guitar",
    "drum",
    "flute",
    "harp",
    "cello",
    "banjo",
    "organ",
]


def _pairs(prompt_fmt: str, comp_fmt: str, items) -> str:
    return "\n".join(f"{prompt_fmt.format(a)}\t{comp_fmt.format(b)}" for a, b in items)


TASKS = {
    "Country to capital": _pairs("Country: {}\nCapital:", "{}", COUNTRY_CAPITALS),
    "Antonyms": _pairs("The opposite of {} is", "{}", ANTONYMS),
    "Uppercase the word": _pairs(
        "Input: {}\nOutput:", "{}", [(w, w.upper()) for w in UPPERCASE_WORDS]
    ),
    "Two-digit addition": "\n".join(
        f"Question: {a} + {b} = ?\tAnswer: {a+b}"
        for a, b in [
            (14, 27),
            (36, 18),
            (47, 36),
            (19, 8),
            (52, 29),
            (63, 17),
            (25, 44),
            (71, 9),
            (38, 23),
            (15, 55),
            (84, 12),
            (29, 31),
            (46, 33),
            (58, 21),
            (67, 14),
            (23, 49),
            (31, 42),
            (76, 13),
            (18, 64),
            (55, 27),
            (42, 39),
            (61, 28),
            (37, 45),
            (24, 57),
            (69, 22),
            (16, 73),
            (48, 35),
            (53, 19),
            (32, 66),
            (77, 11),
        ]
    ),
}