1### Demo ###
21.2 / (3.3 + 1.7)
33M / 6k
45 % 2
5
6# Unit conversions
7a = 1.7ft + 25.3 cm
8a in inches
93 yards in mm
10pi * 6cm^2
111km to mi
12
13# Currency conversions
1429 CAD to USD
15100 GBP in $
16$2000 to btc
17$6 in nickels
18
19# Variables
20width = 6 feet
21length = 30 inches
22height = 45 cm
23width * length * height in gallons
24width * length
25
26# Algebra
27f = parse('2x + x')
28f.evaluate({ x: 4 })
29simplify('x * y * -x / (x ^ 2)')
30derivative("2x^2 + 3x + 4", "x")
31
32# Percentages
3312% of 20
3440 + 30%
3520% off 110
36
37# Functions
38round(pi, 5)
39log(10000, 10)
40sqrt(-4)
41sin(90 deg)
42hyp(a, b) = sqrt(a^2 + b^2)
43hyp(3, 4)
44
45# Date calculations
46today - 3 weeks
47now + 36 hours - 2 days
48yesterday - 1 year
49
50ladle = 6 tablespoons
51gravyBoat = 5 ladle
523 gravyBoat in cups
53
54hexToChar("D83DDE43")
55charToHex("👾")
56
57anArray = [[2, 0], [-1, 3]]
58aMatrix = matrix([[7, 1], [-2, 3]])
59multiply(anArray, aMatrix)
60aMatrix * 2
61
62[2, 3, 4] - 3
63
64add(aMatrix, 2)
65
66det(aMatrix)
67det(anArray)
68