3.9 Slideshow

Students build a slideshow. They use If-Else statements to signify the first and last slide and make a character appear on one specific slide.
Slideshows are a great way to tell stories and it maybe something your students explore for their mid-term or final project
.

OBJECTIVES:


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

    • write pseudocode

    • formulate if-else statements

    • comprehend that conditional statements such as If and If-Else, branch code.

    • recognize broadcast and receive commands

    • recall the importance of naming descriptively.

TEACHER RESOURCES:

Standards

    • CSTA 2-AP-12: Design and iteratively develop programs that combine control structures, including nested loops and compound conditionals.

    • CSTA 2-AP-13: Decompose problems and subproblems into parts to facilitate the design, implementation, and review of programs.

CSTA

DO NOW:

Recap on Broadcast: Ask students to look inside Scratch Broadcast Example and discuss what broadcast does.

A broadcast message is broadcast to all. Only those sprites waiting to receive that particular message, will respond.

Mini-Lesson (5-10 minutes)

Wrap around Slides 7-9 ( broadcast) 10 - 20 ( instructions)

Project (20-30 minutes)

Lesson structure:

  1. Students look at the final demo project. Today they will build a slideshow with 5 slides(backdrops).
    They will use an If-Else to stop at the first slide, end at the last slide, and add a sprite to one slide.

2. Students write their pseudocode for the three If-Else statements in the student document
This gives students time to to think about how they will design their unique slideshow, plus allows for clarification on any misconceptions about If-Else.

3. Students use starter project to make their slideshow .




Details.

Slideshows are great ways to convey information.
This projects' skeleton structure could be remixed and used in a mid-term or final project to convey a story or a public service announcement.


If-Else: Students gain practice with the If-Else conditional statement and recognize that it allows code to branch.

Students use three if-else statements:

    1. Test if you are at the first slide. If true, say "that's it!" else go to previous slide.

    2. Test if you are at last slide. If true, they say "that's it!" else go to next slide.

    3. Make a character appears on only one backdrop. If on that backdrop, show character, else hide the character.


Broadcast: Students should be familiar with broadcast command from previous lessons. The broadcast code is given in the starter project.

Broadcast is like a Radio Station. The radio station broadcasts to all, but only those tuned into that radio channel listen to it. The same is true of the scratch broadcast command. A broadcast message is broadcast to all. Only those sprites waiting to receive that particular message, will respond.

Two main points to mention with broadcast.:

1. Broadcast is sent to all sprites. More than one sprite can respond. ( this is a powerful feature)

2. Only sprites waiting to receive that particular message will respond. ( a common misconception is to think that a sprite will respond to all broadcasts. Sprites will only respond to the specific broadcast message they are waiting to receive).

Broadcasts are a great way of moving between slides, or changing levels in a game, since many sprites can respond to a single broadcast message.

Pseudocode, gives students time to think about how they want to design their unique project.

The student handout contains a Pseudocode section, that students fill out.

Meaningful descriptive names.
Broadcast messages should be named descriptively, so it is easier to understand what each broadcast does. eg: "next", "previous"

Close-Out (5 minutes)

Close-Out (5 minutes)

Discuss the following questions:

    1. Can you think of a time when broadcast would be useful? ( Changing levels in games, Calling sprites to attention, eg at end of level)

    2. Did you notice how the equal Operator can apply to names and words as well as numbers?

    3. Can you think of how you might develop this Slideshow into a mid-term or final project?

Potential Responses

    1. Changing levels in games, Calling sprites to attention, eg at end of level