Lesson 4: The power of water

  1. Understand functions: Grasp the concept of functions as reusable sets of instructions for specific tasks.
  2. Use ballista and water droplet as functions: Use functions to avoid repetitive code and organize programs effectively.
  3. Apply functions to problem-solving: Solve coding challenges and real-world problems using functions.

Introduction:

Built-in functions are like shortcuts that allow the computer to perform common tasks quickly and easily.. They are sets of instructions that have been written by other programmers and packaged together so that we can use them over and over again. When we want to use a built-in function, we simply call its name, and the computer knows what to do. It’s like telling the computer, “Hey, use this specific tool from the toolbox!”

So, think of the ballista and water droplet attachments in your robot set as similar to built-in functions for computers or robots. They provide new abilities that we can simply add to our robot or computer and start using right away. It’s like giving our robot or computer superpowers to do fun and exciting things without having to figure out all the details ourselves.

Activity:

Dialogue:

Kid: (panicked) Help! The pizza shop is on fire! We need help right away!

Dispatcher: Don’t worry, help is on the way! I’m sending the firemen to save the day. They’ll bring a special tool called a fireman’s ladder and a powerful hose with water.

Kid: Thank you! Please make them come quickly!

Dispatcher: They’re on their way. Stay calm and wait for them to arrive. They’ll use the ladder to reach the higher floors and the water from the hose to put out the fire. The pizza shop will be safe soon.

Kid: Okay, I’ll be waiting for them. Please tell them to hurry!

Dispatcher: They’re aware of the urgency. Just stay safe and let them handle the situation. Help is on the way.

Kid: Thank you for your help!

Dispatcher: You’re welcome. Take care, and remember, the firemen will be there soon. Goodbye for now.

Kid: Goodbye, and thank you again!

Answer keys:

Answer3 by wacheerapan kaewprapan