Animate Your Name

Excellent! Your name is drawn as a collection of bubbles. How did this happen?

  1. In line 1, you created a variable named myName in which you stored a string of your name
  2. In line 5, a function named drawName() took your name string and drew it on the screen.

Hang on, what's a function? A function takes in an input, does something with it, and then returns an output. In our code, the input was your name, and the output was the picture of your name as a bunch of bubbles.


Let's give the bubbles some color. I've prepared another variable named blue that stores the color blue. Add blue as another input to the drawName function, like this: drawName(myName, blue);. See what output you get.

View Preview