6.3 Animation Cycles Day 1

Students use make-a-block to create two "animation cycle" blocks: Jump and Spin. Students create an animation using these new blocks.

OBJECTIVES:



OBJECTIVES: By the end of this lesson, students will:

    • identify reasons to use a procedure: easier to read; reusable, more outcomes.

    • observe that changing the value of a procedure's argument, changes the outcome.

    • recognize that remixing is a great way to learn, whilst crediting original author.

TEACHER RESOURCES:

Standards

    • CSTA 2-AP-14: Create procedures with parameters to organize code and make it easier to reuse

    • CSTA 2-AP-16: Incorporate existing code, media, and libraries into original programs, and give attribution.

CSTA

DO NOW:

Do Now Diversity in Tech (5 minutes)

Students watch the following video Careers in Tech: My name is Kinsley (2:27) to explore diversity in tech, then respond to the following questions:

    1. Where does Kinsley work? What is his job there?

    2. Why does Kinsley say it is important to work with diverse people?

    3. What does Kinsley say is the best way to get started?

Teacher Guidance

  • Kinsley works at Facebook on the “Save for Later” team, which allows users to save videos, articles, and images to access later. He says having diverse team members is important so you are able to represent the people you are trying to serve, and so you understand the different ways people will access your program. He says the best way to get started is to try recreating something like a game or app you already like.

Mini-Lesson (5-10 minutes)

Today students are going to make their own blocks in scratch.



Review existing scratch blocks and notice that

  • some have no arguments,

  • some have one argument

  • some have more arguments.

Question: What is the advantage of having inputs to a bock? eg move X steps?

Answer: Passing information to a block allows it to produce a lot more outcomes. eg move(100) steps or move(10 ) steps.



Arguments: are values passed into a procedure call, e.g. value 30


Parameter is the is the variable listed inside the parentheses in the procedure definition. eg Height


A procedure can have more than one Argument.

TEACHER GUIDANCE: Make-a-Block is known in other languages as a Procedure or Routine. Make-a-Block does not return information, so it is not a Function.

Project (20-30 minutes)

Show demo project (also on student page). Today students are going to make a blocks, jump and spin.
Students will then use these blocks more than once ( with different parameters, whilst creating an animation.


Question: Why make your own blocks? Video: Why make your own block?

                  • It keeps code simple, so it is easier to read.

                  • It keeps reuses code, so less code is needed.

                  • Making a block with Parameters will increase the number of outcomes you get from the block.

Close-Out (5 minutes)

Close-Out (5 minutes)

Discuss the following question:

    1. Why make your own block? or "Why create your own procedures?"

Potential Responses


      • easier to read, complexity is hidden at a lower level.

      • reusable code - so less code to read.

      • multiple outcomes, if you use an input parameter: e.g. Jump(height)