Lessons
Nim · Introductory
Nim · Introductory. Ten lessons. Open-book quizzes. Lesson 1 free.
10 lessons · The Host · Lesson 1 free
Pass all ten lessons for the certificate. Sample · Claim

Lesson 1 · On the house
Hello, var, let, and const
Compile and run with nim r, print with echo, and choose var, let, or const.

Lesson 2
Types and conversions
int, float, bool, char, string, type inference, explicit conversion, and integer division.

Lesson 3
if, case, and when
Branching expressions, case with ranges and sets of values, and compile-time when.

Lesson 4
Loops and ranges
for with .. and ..<, countdown, while, break, continue, and loop labels.

Lesson 5
Procedures
proc syntax, result, default and named arguments, var parameters, and UFCS calls.

Lesson 6
Arrays and sequences
Fixed arrays, growable seqs, @[] literals, add, slicing, and openArray parameters.

Lesson 7
Strings and formatting
Concatenation with &, $ to stringify, strutils helpers, and strformat fmt/&.

Lesson 8
Tuples and objects
Named and anonymous tuples, object types, construction, and value semantics.

Lesson 9
Enums and sets
Enumerations, ord and $, iterating enums, and bitset-backed set types.

Lesson 10
Exceptions and defer
raise, try/except/finally, custom exception types, defer, and Defects vs CatchableErrors.
Sample certificate
Certificate of completion
Sign in to claim your certificate of completion.
Certificate
Finish all ten lessons, then sign in
Pass every lesson on this device (quizzes and checks). Then sign in or create an account to type your name and download the JPG.