In this activity, we will write our first real Python program in PictoBlox! We will use Python code to make Tobi the bear introduce himself on the Stage using speech bubbles.

Setting Up
- Open PictoBlox and create a New File.
- Select Python as the coding environment.
- Make sure the Tobi sprite is on the Stage.
Understanding the say() Function
In PictoBlox Python mode, sprites have built-in functions. The say() function makes a sprite display a message in a speech bubble, just like the 'Say () for () seconds' block in block coding.

Sprite Speech Functions
Writing the Script
Now let's write the Python script to make Tobi introduce himself. Type the following code in the Python editor:
tobi.say("Hi! My name is Tobi.", 2) tobi.say("I am a bear who loves coding!", 2) tobi.say("Welcome to Python programming!", 2)
Running the Script
- Click the Run button (green flag) to execute the code.
- Watch Tobi display each message one after another on the Stage.
- Each message stays on screen for 2 seconds before the next one appears.

Challenge
Modify the script to make Tobi introduce YOU instead! Change the messages so Tobi says your name, your age, and your favorite hobby.

.webp&w=3840&q=75)
.webp&w=3840&q=75)
.webp&w=3840&q=75)
.webp&w=3840&q=75)
.webp&w=3840&q=75)