TASK 2

Type Correctness

Of course, it printed 10, is that what you expected?

Did you notice that we have to put the data type when we use a variable?

You'll be pleased to know, you only have to do this the first time you use a variable.

This is because integers, strings, booleans and floats all use different sizes and shapes of boxes, and you can't put the wrong type into a box

When you exit this question, try to run the code, you'll get an error!

Not to worry, the code you will see was just trying to use the wrong box.

Can you correct the code so that the right shape of box is being used?

Well done!

When you are ready, continue on to the next task.

Something isn't quite right...

Close this message and have another go!

GUIDE

This guide is intended to help with syntax. See the prelude section for pre-defined functions and variables. See the tutorials page for tutorials on how to write code.



Can't find what you're looking for?

Check the tutorials page for more!

PRELUDE

The prelude is all the pre-defined functions and variables available to use. See the tutorials page for tutorials on how to write code.



Can't find what you're looking for?

Check the tutorials page for more!