code / tomo-koans

Lines447 Tomo432 INI9 Markdown6
(28 lines)
1 # Basic Types
3 func main()
5 # Tomo has several built-in types, including:
6 # - Int (integer numbers)
7 # - Num (floating-point numbers)
8 # - Text (string values)
9 # - Bool (yes or no)
11 # Fix these variables so they match the expected values:
13 a := 42
14 b := 3.14
15 c := "Tomo"
16 # Boolean values use `yes`/`no`, not `true`/`false`
17 d := yes
19 assert a == ???
20 assert b == ???
21 assert c == ???
22 assert d == ???
24 # Text values support interpolation using `$`:
25 name := "Alice"
26 greeting := "Hello $name"
28 assert greeting == ???