{ }codelper

Learn with tiles › 27

Calculating

Add, subtract, multiply and divide numbers, and join text.

1

The console is good for practising with values. The value you calculate appears on the screen right away.

Let's look at four calculation tiles first. ( ) + ( ) adds, ( ) - ( ) subtracts, ( ) * ( ) multiplies, ( ) / ( ) divides.

Tap the slot of the write tile and choose multiply from ▾. You can also tap the sign in the middle of a calculation tile to change it to another calculation.

To do Calculate 12 times 3 so that 36 appears.

Loading tiles…

2

Division / also gives decimals. 17 / 5 is 3.4.

The fifth calculation tile, ( ) % ( ), gives what is left over after dividing (the remainder). 17 % 5 is 2. It is often used to find out whether a number is even or odd.

Make the second write tile write the remainder.

To do Make the first line show 17 divided by 5 (3.4) and the second line show the remainder of 17 divided by 5 (2).

Loading tiles…

3

+ also joins text. "Hello, " + "Lara" is Hello, Lara. If you join a number to text, the number becomes text and is attached.

The two slots of a calculation tile hold numbers at first. To put text in, tap the slot and choose "Text" under Values in ▾.

The green tile at the top makes the variable name. Write , hello! after the variable name.

To do Make Lara, hello! appear. Join the variable name and a text with +.

Loading tiles…

Next: Getting input →