Concatenation

Nothing to do with cats!

When we are using repeats to print to the screen, it is better if we don’t just print the same thing over and over again. There are better ways to use 10,000 times the age of the universe, I’m sure you’ll agree.

Start the 2Code lesson Concatenation. You can search for it, or find it in 2Code | Coding Principles, below the Gibbon level lessons.

Challenge 3

When you get to Challenge 3, here’s a hint on how to concatenate.

Hint showing where to click for Challenge 3

For Challenge 4, do the same again and remember to actually put a space in the box. Use the spacebar on your keyboard.

Challenge 6 Your Own Code

Here is a hint for Challenge 6. Adding the full stop to each sentence is tricky. Can you do it?

Hint showing where to click for Challenge 6

Save your work in your 2Code folder with a sensible filename.

Discussion

So what is concatenation exactly?


Extension

Recode the concatenation lesson in Free Code Gorilla.

Can you?

  • Print the text in a random colour each time around the loop.
  • Make some animals move across the screen.