In this session, you are going to have hands-on with the Pictoblox application and its various features like- Adding Sprites, and Backdrop and also become familiar with Graphical Programming also known as Block-Based Programming. This session aims to solidify the knowledge of basic block-based coding and to know each block in it. In this lesson, you’ll learn to make a small activity Tobi Walking.
Getting Started with Programming
What is a Program?
“A program is a set of instructions that a computer follows to complete a task. The computer receives the information, handles it, utilizes it, and then gives an output based on it by following a program.”
We are surrounded by computers and computer programs; smartphones, cars, and washing machines are all computers, and they follow different programs to carry out different tasks. E.g. when you search for a contact on your phone, a program already fed into the phone finds the correct number for you. Washing machines also have different programs that decide which task the machine will do. E.g. programs control how hot the water will be, or for how long the machine will wash the clothes.
According to Linda Liukas, a Finnish computer programmer, children’s writer, and programming instructor, programming consists of three parts:
- Planning the program
- Writing the program in a programming language into a code
- Testing and debugging the program
The second part is what everybody generally considers programming. Only this part requires coding skills; the first and third parts require additional skills like problem-solving, and decomposition (the ability to break down bigger problems into smaller, manageable tasks).
Important Terms in PictoBlox
Activity: Tobi Walking
Follow the steps shown in the video:
- Open the Events palette. Drag the “when flag clicked” hat block into the scripting area. Click the green flag above the stage to run the script.
- Next, open the Control palette and drag and drop the forever block below the when flag clicked block.
- Then, open the Motion palette and drag and drop the move () steps inside the forever block.
- Open the Motion palette and drag and drop the if on edge, bounce block inside the forever block.
- Go to the Motion palette and drag and drop the set rotation style () below the when flag clicked block and select left-right from the drop-down.
- Open the Control palette and drag and drop the wait () seconds block below the move () steps to block and change the delay value to 0.1 seconds. The script is now complete!
Run it by clicking the green flag.
Yay! You’ve just completed your first script! Pat yourself on the back.
Saving the Program
Follow the steps to save the file in Windows, macOS, and Linux:
- To save the program, click on File > Save As.
- A window will pop up. Choose the location as Desktop or any other relevant folder. Name the file Tobi Walking.
Click on Save. The file is saved with a .sb3 extension on your computer.