Cursus Raku / Elementa / Plura de generibus / Typis variabiles / Typus limitationes

Quiz — Typus limitationes

Make the variables in the below program typed-restricted. Choose the most narrow type required to keep the value;

Intmy ␣␣␣ $a = 500;
Intmy ␣␣␣ $b = 304839573985398539853535353;Long numbers are supported out of the box.
Ratmy ␣␣␣ $c = 3.5;This is a Rat. Note that Num values are written in scientific notation.
Ratmy ␣␣␣ $d = 17/19;This is also a Rat, and not a division.
Ratmy ␣␣␣ $e = <2/5>;This is one of the possible notations for Rats.
Nummy ␣␣␣ $f = pi;The built-in value of π is a Num value.
Nummy ␣␣␣ $g = 3e-4;
Strmy ␣␣␣ $h = '18';

Typus limitationes   |   Utendo of