Elementary School course

Programming 102

  • GRADES 3-4
  • INTERMEDIATE
  • WEB IPAD
  • 16 LESSONS
Slide: 1 of 25

Answer Key

Module 4: Train the Dragon

Module 5: Fly the Dragons

Module 6: Dodge the Castles

Module 8: Obstacle Game

Module 9: Quiz

1. What will this code block do? {"func":"registerSpriteTrigger","next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}}

  • When the Actor is clicked, the Actor will appear in the middle of the screen
  • When the Actor is clicked, the Actor will appear on the right side of the screen
  • When the project plays, the Actor will appear in the middle of the screen
  • When the project plays, the Actor will appear on the right side of the screen

2. What will this code block do? {"func":"registerSpriteTrigger","next":{"func":"blockLooksHide"}}

  • When the Actor is clicked, the Actor will disappear from the screen
  • When the Actor is clicked, the Actor will appear in the middle of the screen
  • When the Actor is clicked, the Actor will play a sound
  • When the Actor is clicked, the Actor will appear on the screen

3. Annie was working on a game where she hides her Actors when she clicks on them. When she tried playing the game again, the Actors were still hidden. What can she add to fix this?

  • She should use {"func":"registerFlagTrigger","next":{"func":"blockLooksShow"}}
  • She should use {"func":"registerFlagTrigger","next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}}
  • She should use {"func":"registerSpriteTrigger","next":{"func":"blockLooksShow"}}
  • She should use {"func":"registerSpriteTrigger","next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}}

4. Ben is programming a game where monsters show up in a random position on the Stage. What can he add to each monster's code so that they appear in different locations each time the game is played?

  • {"func":"registerFlagTrigger","next":{"func":"blockMotionGoTo","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"300"},{"type":"number","value":"300"}]},{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"-200"},{"type":"number","value":"200"}]}]}}
  • {"func":"registerFlagTrigger","next":{"func":"blockLooksHide"}}
  • {"func":"registerFlagTrigger","next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}}
  • {"func":"registerFlagTrigger","next":{"func":"blockLooksNextCostume"}}

5. Ellie wants to program a ghost to say "Boo!" a random number of times between 1 and 5 when the player clicks on him. Which code blocks will help her do that?

  • {"func":"registerSpriteTrigger","next":{"func":"blockControlRepeat","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"5"}]}],"containers":[{"func":"blockLooksSayFor","values":[{"type":"string","value":"Boo!"},{"type":"number","value":"1"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":".1"}]}}]}}
  • {"func":"registerSpriteTrigger","next":{"func":"blockControlRepeat","values":[{"type":"number","value":"5"}],"containers":[{"func":"blockLooksSayFor","values":[{"type":"string","value":"Boo!"},{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"5"}]}],"next":{"func":"blockControlWait","values":[{"type":"number","value":".1"}]}}]}}
  • {"func":"registerSpriteTrigger","next":{"func":"blockControlRepeat","values":[{"type":"number","value":"5"}],"containers":[{"func":"blockLooksSayFor","values":[{"type":"string","value":"Boo!"},{"type":"number","value":"1"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":".1"}]}}]}}
  • {"func":"registerSpriteTrigger","next":{"func":"blockControlRepeat","values":[{"type":"number","value":"5"}],"containers":[{"func":"blockLooksSayFor","values":[{"type":"string","value":"Boo!"},{"type":"number","value":"1"}],"next":{"func":"blockControlWait","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"5"}]}]}}]}}

6. True or False: It is not possible to show an Actor again after hiding it.

  • True
  • False

7. What does this code block do when run? {"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":"-90"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}}}}

  • It would move the Actor to the right and back to where it started
  • It would move the Actor right twice
  • It would move the Actor left twice
  • It would move the Actor to the left and back to where it started

8. Daniel added background music to his game, but it stops after playing once. He wants it to loop for the entire game. How can he fix this?

  • He should put the Play Sound Until Done block in a Forever loop, like this: {"func":"registerFlagTrigger","next":{"func":"blockControlForever","containers":[{"func":"blockSoundPlayUntilDone","values":[{"type":"string","value":"bg music"}]}]}}
  • He should put the Play Sound Until Done block in a Repeat loop, like this: {"func":"registerFlagTrigger","next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockSoundPlayUntilDone","values":[{"type":"string","value":"bg music"}]}]}}
  • He needs to add the sound to the Stage, and it should automatically loop forever
  • He should put the Play Sound Until Done block under a When Actor Clicked block, like this {"func":"registerSpriteTrigger","next":{"func":"blockSoundPlayUntilDone","values":[{"type":"string","value":"bg music"}]}}

9. Richard is trying to make the Actor disappear. Which block will make the Actor disappear from the screen?

  • {"func":"blockLooksHide"}
  • {"func":"blockLooksShow"}
  • {"func":"blockControlForever","containers":[null]}
  • {"type":"wrapper","func":"valueSensingTouchingColor","values":[{"type":"color","value":"#00ff00"}]}

10. True or False: Using this block {"func":"blockLooksHide"} will stop all code blocks from that Actor.

  • True
  • False

11. What will this code block do? {"func":"registerSpriteTrigger","next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}}

  • When the Actor is tapped, the Actor will appear in the middle of the screen
  • When the Actor is tapped, the Actor will appear on the right side of the screen
  • When the project plays, the Actor will appear in the middle of the screen
  • When the project plays, the Actor will appear on the right side of the screen

12. What will this code block do? {"func":"registerSpriteTrigger","next":{"func":"blockLooksHide"}}

  • When the Actor is tapped, the Actor will disappear from the screen
  • When the Actor is tapped, the Actor will appear in the middle of the screen
  • When the Actor is tapped, the Actor will play a sound
  • When the Actor is tapped, the Actor will appear on the screen

13. Annie was working on a game where she hides her Actors when she taps them. When she tried playing the game again, the Actors were still hidden. What can she add to fix this?

  • She should use {"func":"registerFlagTrigger","next":{"func":"blockLooksShow"}}
  • She should use {"func":"registerFlagTrigger","next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}}
  • She should use {"func":"registerSpriteTrigger","next":{"func":"blockLooksShow"}}
  • She should use {"func":"registerSpriteTrigger","next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}}

14. Ellie wants to program a ghost to say "Boo!" a random number of times between 1 and 5 when the player taps him. Which code blocks will help her do that?

  • {"func":"registerSpriteTrigger","next":{"func":"blockControlRepeat","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"5"}]}],"containers":[{"func":"blockLooksSayFor","values":[{"type":"string","value":"Boo!"},{"type":"number","value":"1"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":".1"}]}}]}}
  • {"func":"registerSpriteTrigger","next":{"func":"blockControlRepeat","values":[{"type":"number","value":"5"}],"containers":[{"func":"blockLooksSayFor","values":[{"type":"string","value":"Boo!"},{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"5"}]}],"next":{"func":"blockControlWait","values":[{"type":"number","value":".1"}]}}]}}
  • {"func":"registerSpriteTrigger","next":{"func":"blockControlRepeat","values":[{"type":"number","value":"5"}],"containers":[{"func":"blockLooksSayFor","values":[{"type":"string","value":"Boo!"},{"type":"number","value":"1"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":".1"}]}}]}}
  • {"func":"registerSpriteTrigger","next":{"func":"blockControlRepeat","values":[{"type":"number","value":"5"}],"containers":[{"func":"blockLooksSayFor","values":[{"type":"string","value":"Boo!"},{"type":"number","value":"1"}],"next":{"func":"blockControlWait","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"5"}]}]}}]}}

15. Daniel added background music to his game, but it stops after playing once. He wants it to loop for the entire game. How can he fix this?

  • He should put the Play Sound Until Done block in a Forever loop, like this: {"func":"registerFlagTrigger","next":{"func":"blockControlForever","containers":[{"func":"blockSoundPlayUntilDone","values":[{"type":"string","value":"bg music"}]}]}}
  • He should put the Play Sound Until Done block in a Repeat loop, like this: {"func":"registerFlagTrigger","next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockSoundPlayUntilDone","values":[{"type":"string","value":"bg music"}]}]}}
  • He needs to add the sound to the Stage, and it should automatically loop forever
  • He should put the Play Sound Until Done block under a When Actor Touched block, like this {"func":"registerSpriteTrigger","next":{"func":"blockSoundPlayUntilDone","values":[{"type":"string","value":"bg music"}]}}

U.S. Standards

  • CCSS-Math: 3.NBT.A.2, 4.NBT.A.2, MP.1
  • CCSS-ELA: RF.3.4.A, RF.4.4.A
  • CSTA: 1B-AP-10, 1B-AP-11, 1B-AP-12, 1B-AP-15
  • CS CA: 3-5.AP.13, 3-5.AP.14, 3-5.AP.17
  • ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 7.c

U.K. Standards

Key stage 2
Pupils should be taught to:
  • design, write and debug programs that accomplish specific goals, including controlling or simulating physical systems; solve problems by decomposing them into smaller parts
  • use sequence, selection, and repetition in programs; work with variables and various forms of input and output
  • use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs
  • understand computer networks, including the internet; how they can provide multiple services, such as the World Wide Web, and the opportunities they offer for communication and collaboration
  • use search technologies effectively, appreciate how results are selected and ranked, and be discerning in evaluating digital content
  • select, use and combine a variety of software (including internet services) on a range of digital devices to design and create a range of programs, systems and content that accomplish given goals, including collecting, analysing, evaluating and presenting data and information
  • use technology safely, respectfully and responsibly; recognise acceptable/unacceptable behaviour; identify a range of ways to report concerns about content and contact

Lesson 7: Motion

Course: | iPad Web

  • Introduction
  • Concepts
  • Fly the Dragons Example
  • Train the Dragon
  • Fly the Dragons
  • Dodge the Castles
  • Obstacle Game Example
  • Obstacle Game
  • Quiz

Description

Advance your class to intermediate level programming concepts using a wider set of visual blocks. In Snowball Siege, students learn about layering, Actor visibiliy, motion, and collisions. Then, in Star Runner, they use line drawing commands and program math art. They build several mini-games while understanding how to create more complex programs. After completing this lesson plan, students will be able to build a wide variety of school projects and their own comprehensive games.

Topics

  • Animation sequences
  • Motion
  • Game design basics
  • Built-in animation commands
  • Advanced keyboard and mouse control
  • Sending and receiving messages
  • Actor layering
  • Advanced events
  • Math operators
  • Functions

What Students Learn

  • Gain confidence in building a variety of programs
  • Apply programming concepts to build your own games
  • Design characters with multiple animation sequences
  • Write interactive stories with multiple scenes
  • Make an image editor using drawing primitives
  • Define more advanced keyboard and mouse interaction
  • Program special effects and explosions
  • Troubleshoot and debug programs

Technical Requirements

* Online courses require a modern desktop computer, laptop computer, Chromebook, or Netbook with Internet access and a Chrome (29+), Firefox (30+), Safari (7+), or Edge (20+) browser. No downloads required.
* Tablet courses require an iPad (iOS 10+) with Tynker or Tynker Junior app installed and Internet access