July 28, 2015 by wendy
At this point, your students might be asking, “How can one sprite tell another sprite to do something?” Let’s find out!
Give some examples of features that your students might want to have in their design projects. Maybe they want a sprite to appear or disappear when another sprite says something. We can do this!
Start with some role-playing. In Scratch, show the script that’s above on the left to your students. Ask for a volunteer to perform the script. Reveal the script for another sprite that’s on the right. Ask for another volunteer, and have both volunteers perform the scripts at the same time. What’s the problem? Our sprites talk over each other! We need to coordinate them, but how?
We can tell sprites to wait for each other by using wait blocks. How can we use wait blocks to fix our problem? Work as a class to come up with a solution and have your performers test it. Your solution should look like the scripts above.
Wait blocks worked in this scenario because we knew how long to wait, but what if we didn’t know how long to wait? Is there another way?
Introduce broadcast and receive blocks. In Scratch, sprites can send invisible messages like radio signals to other sprites. Other sprites can choose to do something when they receive certain messages.
Revisit your solution with the wait blocks, and as a group, try to replace them with broadcast and receive blocks. Your solution should look like the scripts above. Run your scripts to make sure they work.
Give your students 10 minutes to create a joke project. They can remix an existing project or start a brand new one. At the end of 10 minutes, ask 5 volunteers to share their jokes with the class.
For the remainder of the class, students can continue to work on their design projects. Encourage them to incorporate timing or messaging into their designs!
July 20, 2015 by wendy
Whether you’re looking for a coding project for your child or yourself, Python might be right for you! This week, we’re taking another break from our Teacher’s Guide to Scratch to give you some tips on how to get started with Python.
If your child has already mastered drag-and-drop programming, like Scratch or Hopscotch, then Python is the perfect next step. If you’re a grown-up and you want to learn how to program, then Python is also the perfect place to start.
Programmers love Python because it’s easy to read and write. You write less code in Python than in other languages because it has fewer symbols and its rules are less strict. In other words, Python is easier to learn!
A book can be a good place to start. Python for Kids: A Playful Introduction to Programming explains key programming concepts and has lots of examples. I started reading this book and liked the step-by-step instructions on how to get started, but for me, it eventually covered too much information for a beginner when I just wanted to play.
Luckily, in Chapter 4, it introduced Turtle, a Python module that allows you to draw on the screen. Turtle was actually part of the original Logo programming language back in the 1960s!
Before you start coding, you’ll need to install Python. Visit the Python website to download the latest version and run the installer. Once Python is installed, look for IDLE on your computer and run it. IDLE is where you’ll write and run your Python programs.
Within the IDLE Python Shell, enter the following lines of code to load the Turtle module and to create your turtle. I’m calling my turtle Frank, but you can choose any name you like.
>>> import turtle >>> frank = turtle.Turtle()
Hopefully, a new window popped up called Python Turtle Graphics with a small triangle in the centre. That’s your turtle! Enter these commands to draw a square:
>>> frank.forward(100) >>> frank.left(90) >>> frank.forward(100) >>> frank.left(90) >>> frank.forward(100) >>> frank.left(90) >>> frank.forward(100) >>> frank.left(90)
Change the values or parameters inside the parentheses to see what they do. For more commands or functions, check out the Turtle documentation on the Python website. In the meantime, experiment with these:
>>> frank.backward(100) >>> frank.right(90) >>> frank.reset() >>> frank.clear() >>> frank.up() >>> frank.down() >>> frank.pencolor("red") >>> frank.pensize(5) >>> frank.circle(100)
Rather than writing your programs in the Python Shell, you can go to File, and click on New File, which will open a new window. When you write your program in the new window, you can save your program and run it by selecting Run and Run Module.
As you become more comfortable with Python and Turtle, incorporate other programming concepts, like loops, to draw more complex designs. Look for examples online, try them out, make them your own, and have fun!
July 13, 2015 by wendy
Congratulations! You’re halfway through our Coding for Kids program! We’ve learned how to sequence instructions to build complex behaviours, how to use events to make interactive programs, and how to use loops to create animations and music. In this lesson, students have the chance to design their own projects.
An open-ended design project is an opportunity for students to not only develop greater fluency in concepts such as events and loops, but also design a project that’s relevant and meaningful to them. What topics are your students most interested in? What types of projects would they like to make?
Explain to your students that today, they’ll be coming up with their own Scratch projects. They can choose to work individually or in pairs. They’ll continue to work on their projects over the next few lessons. Then on the last day, they’ll present their projects to the class!
Today, their job is to brainstorm, come up with an idea, make a plan, and to gather feedback. If they finish early, they can start working on their projects.
Remind your students by reviewing past projects that they’ve learned a lot. Now that it’s their turn to design a project, what will they create? Start a discussion with your students about topics that interest them and the types of projects that they would like to make.
Give them the option to build on an existing project or to create a brand new one. Also remind them that it’s okay if there’s a part of the project that they don’t know how to make yet. We’ll still be learning new concepts over the next few lessons, and they can also research on their own!
Give your students time to explore and brainstorm. Perhaps they can add projects that inspire them into their own Scratch studios. Encourage them to sketch their ideas, and to write down any questions and how they might find the answers.
Once your students are ready, ask them to share their project plans with other students and to gather at least 3 suggestions. If there’s time remaining, students can start working on their projects, and at the end of class, ask for a few volunteers to share their progress.
July 6, 2015 by wendy
We continue to explore loops, music, and animation by building dance parties with our favourite songs!
Last week, we played with repeat loops to animate sprites and make music. How are repeat loops helpful? This week, we’re experimenting with another type of loop called the forever loop. Can your students guess what a forever loop is for?
Start the lesson by looking at some dance party examples like the ones above. How did each sprite have so many different looks? In Scratch, we need costumes!
Create a new project and make sure that Scratch Cat is selected. Click on the Costumes tab next to the Scripts tab. Notice that even Scratch Cat has two different poses or costumes: costume1 looks like Scratch Cat is walking and costume2 looks like Scratch Cat is running. If you click between the two, Scratch Cat starts to animate, but how do we animate using code?
By combining forever blocks with costume blocks, we can make sprites dance. Choose a sprite with multiple costumes, and then demonstrate different ways to animate the sprite:
Don’t forget to show students that they can also paint new costumes to create their own animations.
Ask your students to think of a favourite song to add to their dance party. Follow these steps to add a song from a YouTube video into a Scratch project:
Give students time to find their favourite song and to explore different dance parties. Here are a couple of places to start: Dance, Dance, Dance Studio and Scratch Day Dance Party.
They can also watch the Make your sprite dance video or try the Dance, Dance, Dance tutorial by clicking on “Tips” in the Scratch editor.
Encourage students to create their own project or to remix an existing project. Challenge them to animate the backdrop. Have your students add their dance parties to the class studio and gather feedback from at least three other students.