Answer Key
Module 4: Draw a Rectangle

Module 7: Quiz
1.
-
{"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.
{"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.
{"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.
and {"func":"blockMotionGoTo","values":[{"type":"number","value":""},{"type":"number","value":""}]}
?
{"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.
{"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.
{"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.
{"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.
{"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.
{"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.
{"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.
{"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}}
-
True -
False
12.
{"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}}
-
True -
False
13.
-
{"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.
{"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.
{"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.
{"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.
{"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.
-
{"func":"blockPenSetColor","values":[{"type":"color","value":"#ffffff"}]}
-
{"func":"blockPenDown"}
-
{"func":"blockPenUp"}
-
{"func":"blockPenClear"}
19.
-
True -
False
20.
-
{"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.
{"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: MP.1
- CCSS-ELA: RF.5.4.A, 6-8.RST.3, 6-8.RST.4, 6-8.RST.7
- CSTA: 1B-AP-11, 1B-AP-15, 2-AP-13, 2-AP-16, 2-AP-17
- CS CA: 3-5.AP.10, 3-5.AP.13, 3-5.AP.14, 3-5.AP.17, 6-8.AP.13, 6-8.AP.16, 6-8.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
Key stage 3
Pupils should be taught to:- design, use and evaluate computational abstractions that model the state and behaviour of real-world problems and physical systems
- understand several key algorithms that reflect computational thinking [for example, ones for sorting and searching]; use logical reasoning to compare the utility of alternative algorithms for the same problem
- undertake creative projects that involve selecting, using, and combining multiple applications, preferably across a range of devices, to achieve challenging goals, including collecting and analysing data and meeting the needs of known users
- create, reuse, revise and repurpose digital artefacts for a given audience, with attention to trustworthiness, design and usability
- understand a range of ways to use technology safely, respectfully, responsibly and securely, including protecting their online identity and privacy; recognise inappropriate content, contact and conduct, and know how to report concerns
Description
Help your students advance their skills as they build Paint Racer, a pen-drawing game, and Cannon Crasher, a physics game. Harness the power of the physics engine to easily program realistic jumps and bouncing balls. Upon completing this lesson plan, students will be able to use model physics properties and generate math art.
Topics
- Geometric patterns
- Angles
- Projectile physics
- Physics engine
- Gravity
- Hit boxes
- Collisions
- Bouncing
- Static platforms
- Impulse
- Velocity and force
- Timers
- Interactions between objects
- Special effects
What Students Learn
- Draw shapes and patterns using pen drawing commands
- Program fluid motion with keyboard control
- Control Actors using messaging
- Define and use functions with parameters
- Build physics projects using gravity, impulse, and velocity
- Build their own versions of classic arcade games
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