Elementary School course

Programming 102

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

Answer Key

Module 4: Hide and Seek

Module 5: Hide and Seek Party

Module 6: Catch Me If You Can

Module 8: Whack-a-Mole!

Module 9: Quiz

1. What does this do? {"func":"registerSpriteTrigger","next":{"func":"blockLooksHide"}}

  • The Actor dances on its head when the program is played.
  • The Actor disappears when clicked.
  • The Actor appears in a random location on the screen.
  • The Actor appears in another project.

2. Why does the Actor not appear after the following block of code? {"func":"registerSpriteTrigger","next":{"func":"blockLooksHide"}}

  • That's the function of the Hide block.
  • The When Actor Clicked block always makes Actors disappear.
  • The code is missing an On Start block.
  • The Actor will not disappear with this code block.

3. What will this block of code do? {"func":"blockControlForever","containers":[{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"wrapper","func":"valueOpRandom","values":[{"type":"wrapper","func":"valueSensingScreenBottom"},{"type":"wrapper","func":"valueSensingScreenTop"}]}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"1"}]}}]}

  • This will make the Actor move to different locations, as long as the x position is 0
  • This will make the Actor move to different locations, as long as the x position is not the same
  • This will make the Actor move to different locations as long as the y position is 0
  • This is will make the Actor stay in the same location

4. Why must we wait a few seconds after hiding an Actor before showing it again?

  • The Actor will disappear forever and not return again no matter what you do if you do not wait a few seconds between the actions.
  • We would not be able to add other Actors if we do not wait a few seconds between the actions.
  • The actions will happen too fast for our eyes to see if we don't wait for a few seconds between the actions.
  • There is no use in waiting a few seconds after hiding an Actor and before showing it.

5. What block of code will make the Actor appear in random locations all over the screen every few seconds?

  • {"func":"registerFlagTrigger","next":{"func":"blockLooksShow"}}
  • {"func":"registerFlagTrigger","next":{"func":"blockControlForever","containers":[{"func":"blockMotionGoTo","values":[{"type":"wrapper","func":"valueSensingScreenLeft"},{"type":"number","value":"0"}],"next":{"func":"blockControlWait","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"10"}]}]}}]}}
  • {"func":"registerFlagTrigger","next":{"func":"blockControlForever","containers":[{"func":"blockControlWait","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"10"}]}]}]}}
  • {"func":"registerFlagTrigger","next":{"func":"blockControlForever","containers":[{"func":"blockMotionGoTo","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"wrapper","func":"valueSensingScreenLeft"},{"type":"wrapper","func":"valueSensingScreenRight"}]},{"type":"wrapper","func":"valueOpRandom","values":[{"type":"wrapper","func":"valueSensingScreenBottom"},{"type":"wrapper","func":"valueSensingScreenTop"}]}],"next":{"func":"blockControlWait","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"10"}]}]}}]}}

6. True or False: You can send all Actors to random locations using {"func":"blockMotionGoTo","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"wrapper","func":"valueSensingScreenLeft"},{"type":"wrapper","func":"valueSensingScreenRight"}]},{"type":"wrapper","func":"valueOpRandom","values":[{"type":"wrapper","func":"valueSensingScreenBottom"},{"type":"wrapper","func":"valueSensingScreenTop"}]}]}

  • True
  • False

7. True or False: You can tell another Actor to hide by broadcasting messages.

  • True
  • False

8. True or False: {"func":"registerSpriteTrigger"} can react to other kinds of events other than mouse clicks, such as key presses.

  • True
  • False

9. True or False: The blocks {"func":"blockLooksShow"} and {"func":"blockLooksHide"} can only be used with {"func":"registerSpriteTrigger"}

  • True
  • False

10. True or False: Multiple Actors can {"func":"blockLooksShow"} and {"func":"blockLooksHide"} at the same time.

  • True
  • False

11. True or False: One Actor can make another hide or show by broadcasting messages.

  • True
  • False

12. True or False: One Actor can make another go to a random location without using the {"func":"blockControlBroadcast","values":[{"type":"string","value":""}]} and {"func":"registerBroadcastTrigger","values":[{"type":"string","value":""}]}

  • True
  • False

13. Which of the following blocks of code makes the Actor stay in the same place? There may be more than 1 answer.

  • {"func":"registerFlagTrigger","next":{"func":"blockControlForever","containers":[{"func":"blockMotionGoTo","values":[{"type":"wrapper","func":"valueSensingScreenLeft"},{"type":"number","value":"0"}],"next":{"func":"blockControlWait","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"10"}]}]}}]}}
  • {"func":"registerFlagTrigger","next":{"func":"blockControlForever","containers":[{"func":"blockMotionGoTo","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"wrapper","func":"valueSensingScreenLeft"},{"type":"wrapper","func":"valueSensingScreenRight"}]},{"type":"wrapper","func":"valueOpRandom","values":[{"type":"wrapper","func":"valueSensingScreenBottom"},{"type":"wrapper","func":"valueSensingScreenTop"}]}],"next":{"func":"blockControlWait","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"10"}]}]}}]}}
  • {"func":"registerFlagTrigger","next":{"func":"blockControlForever","containers":[{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"wrapper","func":"valueOpRandom","values":[{"type":"wrapper","func":"valueSensingScreenBottom"},{"type":"wrapper","func":"valueSensingScreenTop"}]}],"next":{"func":"blockControlWait","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"10"}]}]}}]}}
  • {"func":"registerFlagTrigger","next":{"func":"blockControlForever","containers":[{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}],"next":{"func":"blockControlWait","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"10"}]}]}}]}}

14. True or False: {"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"10"}]} will give a number that is between 1 and 10, but not including 1 or 10.

  • True
  • False

15. What does this do? {"func":"registerSpriteTrigger","next":{"func":"blockLooksHide"}}

  • The Actor dances on its head when the program is played.
  • The Actor disappears when tapped.
  • The Actor appears in a random location on the screen.
  • The Actor appears in another project.

16. Why does the Actor not appear after the following block of code? {"func":"registerSpriteTrigger","next":{"func":"blockLooksHide"}}

  • That's the function of the Hide block.
  • The When Actor Clicked block always makes Actors disappear.
  • The code is missing an On Start block.
  • The Actor will not disappear with this code block.

17. True or False: {"func":"registerSpriteTrigger"} can react to other kinds of events other than touching the screen, such as tilting the device.

  • True
  • False

U.S. Standards

  • CCSS-Math: 3.NBT.A.2, MP.1
  • CCSS-ELA: RF.3.4.A, RF.4.4.A
  • CSTA: 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 5: Show and Hide

Course: | iPad Web

  • Introduction
  • Concepts
  • Hide and Seek Example
  • Hide and Seek
  • Hide and Seek Party
  • Catch Me If You Can
  • Whack-a-Mole Example
  • Whack-a-Mole!
  • 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