Instructional Day: 18
Topic Description: This lesson requires students to apply their knowledge of conditionals to develop a Rock Paper Scissors program in Scratch.
Objectives:
The students will be able to:
Apply knowledge of conditionals to complete a Rock Paper Scissors program.
Outline of the Lesson:
Review of Rock Paper Scissors rules (5 minutes)
Rock Paper Scissors discussion (10 minutes)
Rock Paper Scissors project (40 minutes)
Student Activities:
Review Rock Paper Scissors rules.
Participate in Rock Paper Scissors discussion.
Complete Rock Paper Scissors project
Students will do the following:
Review of Rock Paper Scissors rules
Rock Paper Scissors discussion
o Look at example and create a similar page: https://scratch.mit.edu/projects/109581738/
Show them how there are variables for ROCK, PAPER and SCISSORS.
Show students variables for player and computer.
Closely examine the computer’s “when I receive showPick” script
Instruct students that they only need to change the script that starts with “When I receive
Ask: Why might it be easier to work with the variables instead of just using numbers?
(Answer: It makes the code easier to read.)
Ask how does the computer determine if they will choose rock, paper, or scissors?
(Answer: It randomly chooses one using “pick random 0 to 2”.)
Explain how the else part works if the condition of the if is false.
Ask: Why don’t you need a statement that says “if computer = scissors”? (Answer: You
asked if it was = to rock and that was false, then you asked if it was equal to paper and
that was false so the only thing left was for it to equal scissors. Hence, you can just put
the “switch to costume scissors” in the else.)
determine winner” under the computer sprite. (They may change more features if they have
time.)
Facilitate them in writing some pseudo code to handle all the cases for the computer