Elementary School course

Programming 102

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

Answer Key

Module 4: Snowball Fight 1

Module 5: Snowball Fight 2

Module 6: Snowball Siege

Module 7: Your Own Snowball Siege

Module 8: Quiz

1. Which two code blocks do the same thing? (Choose 2.)

  • {"func":"blockMotionPointDirection","values":[{"type":"string","value":"0"}]}
  • {"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}]}
  • {"func":"blockMotionPointDirection","values":[{"type":"string","value":"180"}]}
  • {"func":"blockMotionPointDirection","values":[{"type":"string","value":"360"}]}

2. What does this block do to an Actor? {"func":"blockMotionGoTo","values":[{"type":"number","value":""},{"type":"number","value":""}]}

  • It will point the Actor in the direction of the given x and y positions
  • It will make the Actor draw a line from where it is to the given x and y position
  • It will move the Actor to the given x and y positions
  • It will hide the Actor

3. What would this code block draw? {"func":"blockPenDown","next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-100"},{"type":"number","value":"-200"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-100"},{"type":"number","value":"200"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}}}}}

  • A triangle
  • A square
  • A rectangle
  • A circle

4. What is the difference between {"func":"blockMotionGoTo","values":[{"type":"number","value":""},{"type":"number","value":""}]} and {"func":"blockMotionMove","values":[{"type":"number","value":""}]} ?

  • The 'Go To' block will move the Actor towards the direction it is pointing toward, while the 'Move' block will place the Actor at that given position
  • The 'Go To' block will move the Actor as it draws a line, while the 'Move' block will only move the Actor
  • The 'Go To' block only works if you place it on the Stage, while the 'Move' block can work for Actors
  • The 'Go To' block will place the Actor at that given position, while the 'Move' block will move the Actor towards the direction it is pointing toward

5. What would happen if you removed the wait blocks from this code block? {"func":"registerBroadcastTrigger","values":[{"type":"string","value":"draw"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-100"},{"type":"number","value":"100"}],"next":{"func":"blockPenDown","next":{"func":"blockControlWait","values":[{"type":"number","value":"0.5"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"100"},{"type":"number","value":"100"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"0.5"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":180}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"100"},{"type":"number","value":"-100"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"0.5"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":-90}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-100"},{"type":"number","value":"-100"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"0.5"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":0}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-100"},{"type":"number","value":"100"}]}}}}}}}}}}}}}}}

  • The racer would draw the square instantly
  • The racer would draw the square at its normal speed
  • The racer would draw the square more slowly
  • The racer would not draw the square

6. What is the purpose of the 'Point in Direction' blocks in this code block? {"func":"registerBroadcastTrigger","values":[{"type":"string","value":"draw"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-100"},{"type":"number","value":"200"}],"next":{"func":"blockPenDown","next":{"func":"blockControlWait","values":[{"type":"number","value":"0.5"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"100"},{"type":"number","value":"200"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"0.5"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":180}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"100"},{"type":"number","value":"-200"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"0.5"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":-90}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-100"},{"type":"number","value":"-200"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"0.5"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":0}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-100"},{"type":"number","value":"200"}]}}}}}}}}}}}}}}}

  • They affect the look of the racer when it is drawn
  • They don't affect the look or movement of the racer

7. Where does this code block place the Actor? {"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}

  • The upper left corner of the Stage
  • The center of the Stage
  • The bottom of the Stage
  • It depends on where the racer was to begin with

8. What does this code block do to an Actor? {"func":"registerTrigger","values":[{"type":"wrapper","func":"valueSensingMouseDown"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"100"},{"type":"number","value":"200"}]}}

  • It will move the Actor to x coordinate 100 and y coordinate 200 when the mouse is pressed
  • It will move the Actor to x coordinate 100 and y coordinate 200 when space is pressed
  • It will move the Actor to x coordinate 100 and y coordinate 200 when the program begins
  • It will move the Actor to the center of the screen

9. Where will the racer be after running this code block? {"func":"blockMotionGoTo","values":[{"type":"number","value":"100"},{"type":"number","value":"-200"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-100"},{"type":"number","value":"-200"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-100"},{"type":"number","value":"200"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"100"},{"type":"number","value":"200"}]}}}}

  • The racer will move to x coordinate 100 and y coordinate 200
  • The racer will move to x coordinate 100 and y coordinate -200
  • The racer will move to x coordinate -100 and y coordinate -200
  • The racer will move to x coordinate -100 and y coordinate 200

10. True or False: Both of these code blocks will cause the racer to end up in the same spot. {"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":"0"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"100"}]}}} {"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"100"}]}

  • True
  • False

11. True or False: If the value in this 'Point in Direction' block is changed, the racer will end up in a different position. {"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}}

  • True
  • False

12. True or False: If I change the value in this 'Point in Direction' block, the racer will end up in a different position. {"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}}

  • True
  • False

13. Which two code blocks move the actor to the same location? (Choose 2.)

  • {"func":"blockMotionGoTo","values":[{"type":"number","value":"10"},{"type":"number","value":"0"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":"270"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}}}
  • {"func":"blockMotionGoTo","values":[{"type":"number","value":"100"},{"type":"number","value":"200"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}}
  • {"func":"blockMotionGoTo","values":[{"type":"number","value":"10"},{"type":"number","value":"0"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":"0"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}}}
  • {"func":"blockMotionGoTo","values":[{"type":"number","value":"10"},{"type":"number","value":"0"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}}}

14. What would this code block draw? {"func":"blockPenDown","next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"100"},{"type":"number","value":"200"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"100"},{"type":"number","value":"200"}]}}}}

  • A line
  • A triangle
  • A square
  • A circle

15. True or False: The racer could still draw a rectangle using the following code block, even if the 'Point in Direction' blocks were removed. {"func":"registerBroadcastTrigger","values":[{"type":"string","value":"draw"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-100"},{"type":"number","value":"200"}],"next":{"func":"blockPenDown","next":{"func":"blockControlWait","values":[{"type":"number","value":"0.5"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"100"},{"type":"number","value":"200"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"0.5"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":180}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"100"},{"type":"number","value":"-200"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"0.5"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":-90}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-100"},{"type":"number","value":"-200"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"0.5"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":0}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-100"},{"type":"number","value":"200"}]}}}}}}}}}}}}}}}

  • True
  • False

16. What will this code block draw? {"func":"blockPenSetColor","values":[{"type":"color","value":"#800080"}],"next":{"func":"blockPenDown","next":{"func":"blockControlRepeat","values":[{"type":"number","value":"4"}],"containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionTurnCCW","values":[{"type":"string","value":"90"}]}}]}}}

  • A purple square
  • A purple circle
  • A red triangle
  • A yellow star

17. What will this code block draw? {"func":"blockPenSetColor","values":[{"type":"color","value":"#0000ff"}],"next":{"func":"blockPenDown","next":{"func":"blockControlRepeat","values":[{"type":"number","value":"3"}],"containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionTurnCCW","values":[{"type":"string","value":"120"}]}}]}}}

  • A blue triangle
  • A blue square
  • A green triangle
  • A red circle

18. Which block can you use to change the color of the pen?

  • {"func":"blockPenSetColor","values":[{"type":"color","value":"#ffffff"}]}
  • {"func":"blockPenDown"}
  • {"func":"blockPenUp"}
  • {"func":"blockPenClear"}

19. True or False: The Pen Down block stops drawing.

  • True
  • False

20. Which block makes the racer look like it is turning?

  • {"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}]}
  • {"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}
  • {"func":"blockControlWait","values":[{"type":"number","value":"1"}]}
  • {"func":"blockPenDown"}

21. What does this code block do to an Actor? {"func":"registerTrigger","values":[{"type":"wrapper","func":"valueSensingMouseDown"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"100"},{"type":"number","value":"200"}]}}

  • It will move the Actor to x coordinate 100 and y coordinate 200 when the screen is touched
  • It will move the Actor to x coordinate 100 and y coordinate 200 when the Actor is tapped
  • It will move the Actor to x coordinate 100 and y coordinate 200 when the program begins
  • It will move the Actor to the center of the screen

U.S. Standards

  • CCSS-Math: 3.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 8: Snowball Siege

Course: | iPad Web

  • Introduction
  • Concepts
  • Snowball Siege Example
  • Snowball Fight 1
  • Snowball Fight 2
  • Snowball Siege
  • Your Own Snowball Siege
  • 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