Answer Key
Module 4: Let There Be Lives

Module 6: Quiz
1.
-
{"func":"blockControlForever","containers":[null]}
-
{"func":"blockSoundPlay","values":[{"type":"string","value":""}]}
-
{"func":"blockControlWait","values":[{"type":"number","value":"1"}]}
-
{"func":"blockLooksSwitchCostume","values":[{"type":"string","value":""}]}
2.
{"func":"registerFlagTrigger","next":{"func":"blockLooksShow","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"knight"}]}],"next":{"func":"blockLooksHide"}}}}
-
If the knight touches the Actor, the Actor will disappear -
If the knight touches the Actor, the knight will disappear -
When the Play button is pressed, the Actor will show for a second or two before hiding -
When the Play button is pressed, the Actor will disappear, then reappear when the knight touches the Actor
3.
{"func":"registerFlagTrigger","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"knight"}]}],"next":{"func":"blockControlForever","containers":[{"func":"blockMotionGoTo","values":[{"type":"wrapper","func":"valueSensingSpriteProperty","values":[{"type":"choice","value":"x position"},{"type":"string","value":"knight"}]},{"type":"wrapper","func":"valueOpAdd","values":[{"type":"wrapper","func":"valueSensingSpriteProperty","values":[{"type":"choice","value":"y position"},{"type":"string","value":"knight"}]},{"type":"number","value":"200"}]}]}]}}}
-
When the knight touches the Actor, the Actor will follow the knight around, hovering over the knight's head -
When the knight touches the Actor, the Actor will follow the knight around, following behind the knight -
When the knight touches the Actor, the knight will follow the Actor around, hovering over the Actor -
When the knight touches the Actor, the knight will follow the Actor around, following behind the Actor
4.
-
{"func":"registerFlagTrigger","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"valkyrie"}]}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-500"},{"type":"number","value":"300"}]}}}
-
{"func":"registerFlagTrigger","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"gem"}]}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-500"},{"type":"number","value":"300"}]}}}
-
{"func":"registerFlagTrigger","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"valkyrie"}]}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-500"},{"type":"number","value":"-300"}]}}}
-
{"func":"registerFlagTrigger","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"valkyrie"}]}],"next":{"func":"blockLooksHide"}}}
5.
-
{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"runner1"}]}]}
-
{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"runner2"}]}]}
-
{"func":"blockControlWait","values":[{"type":"number","value":"1"}]}
-
{"func":"blockLooksSwitchCostume","values":[{"type":"string","value":"runner1"}]}
6.
-
{"func":"registerFlagTrigger","next":{"func":"blockLooksShow","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"knight"}]}],"next":{"func":"blockLooksHide"}}}}
-
{"func":"registerFlagTrigger","next":{"func":"blockLooksShow","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"mouse-pointer"}]}],"next":{"func":"blockLooksHide"}}}}
-
{"func":"registerFlagTrigger","next":{"func":"blockLooksShow","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"edge"}]}],"next":{"func":"blockLooksHide"}}}}
-
{"func":"registerFlagTrigger","next":{"func":"blockLooksShow","next":{"func":"blockControlWait","values":[{"type":"number","value":"1"}],"next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"knight"}]}],"containers":[{"func":"blockLooksHide"}]}}}}
7.
-
{"func":"registerFlagTrigger","next":{"func":"blockControlForever","containers":[{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockSoundPlay","values":[{"type":"string","value":"beep"}]}]}]}}
-
{"func":"registerFlagTrigger","next":{"func":"blockControlForever","containers":[{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueSensingKeyPressed","values":[{"type":"choice","value":"up arrow"}]}],"containers":[{"func":"blockSoundPlay","values":[{"type":"string","value":"beep"}]}]}]}}
-
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"up arrow"}],"next":{"func":"blockSoundPlay","values":[{"type":"string","value":"beep"}]}}
-
{"func":"registerSpriteTrigger","next":{"func":"blockSoundPlay","values":[{"type":"string","value":"beep"}]}}
8.
block from this code block?{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingKeyPressed","values":[{"type":"choice","value":"space"}]}]}
{"func":"registerFlagTrigger","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingKeyPressed","values":[{"type":"choice","value":"space"}]}],"next":{"func":"blockLooksNextCostume"}}}
-
The Actor would change Costumes as soon as the program started -
The Actor would change Costumes when space was pressed -
The Actor would change Costumes when the mouse was clicked -
The Actor would never change Costumes
9.
and {"func":"blockControlWait","values":[{"type":"number","value":""}]}
blocks?
{"func":"blockControlWaitUntil","values":[{"type":"boolean","value":""}]}
-
The
block waits for a specified amount of time, while the{"func":"blockControlWait","values":[{"type":"number","value":""}]}
block waits for a condition to be fulfilled.{"func":"blockControlWaitUntil","values":[{"type":"boolean","value":""}]}
-
The
block waits for a condition to be fulfilled, while the{"func":"blockControlWait","values":[{"type":"number","value":""}]}
block waits for a specified amount of time.{"func":"blockControlWaitUntil","values":[{"type":"boolean","value":""}]}
-
The
and{"func":"blockControlWait","values":[{"type":"number","value":""}]}
blocks both wait for a condition to be fulfilled.{"func":"blockControlWaitUntil","values":[{"type":"boolean","value":""}]}
-
The
and{"func":"blockControlWait","values":[{"type":"number","value":""}]}
blocks both wait for a specified amount of time.{"func":"blockControlWaitUntil","values":[{"type":"boolean","value":""}]}
10.
{"func":"registerFlagTrigger","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingKeyPressed","values":[{"type":"choice","value":"space"}]}],"next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingKeyPressed","values":[{"type":"choice","value":"space"}]}],"next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingKeyPressed","values":[{"type":"choice","value":"space"}]}],"next":{"func":"blockSoundPlay","values":[{"type":"string","value":"beep"}]}}}}}
-
You would need to press space three times -
You would need to press space once -
You would need to click with the mouse once -
You would need to press the up arrow key
11.
-
At least one loop inside of another loop -
One loop placed after another loop -
At least one If statement inside of a loop -
At least one Wait statement inside of a loop
12.
{"func":"registerFlagTrigger","next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}],"next":{"func":"blockControlForever","containers":[{"func":"blockLooksNextCostume"}]}}}
-
True -
False
13.
{"func":"registerFlagTrigger","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingKeyPressed","values":[{"type":"choice","value":"space"}]}],"next":{"func":"blockSoundPlay","values":[{"type":"string","value":"beep"}]}}}
-
True -
False
14.
-
True -
False
15.
-
True -
False
16.
block from this code block?{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingMouseDown"}]}
{"func":"registerFlagTrigger","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingMouseDown"}],"next":{"func":"blockLooksNextCostume"}}}
-
The Actor would change Costumes as soon as the program started -
The Actor would change Costumes when the device was tilted forward -
The Actor would change Costumes when the screen was touched -
The Actor would never change Costumes
17.
{"func":"registerFlagTrigger","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingMouseDown"}],"next":{"func":"blockSoundPlay","values":[{"type":"string","value":"beep"}]}}}
-
True -
False
U.S. Standards
- CCSS-Math: 6.NS.C.6, MP.1, MP.2, MP.4
- CCSS-ELA: RI.7.4, RI.8.4, 6-8.RST.3, 6-8.RST.4, 6-8.RST.7
- CSTA: 2-AP-10, 2-AP-12, 2-AP-13, 2-AP-15, 2-AP-16, 2-AP-17
- CS CA: 6-8.AP.12, 6-8.AP.13, 6-8.AP.15, 6-8.AP.16, 6-8.AP.17
- ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b
U.K. Standards
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
Key stage 4
All pupils must have the opportunity to study aspects of information technology and computer science at sufficient depth to allow them to progress to higher levels of study or to a professional career. Pupils should be taught to:- develop their capability, creativity and knowledge in computer science, digital media and information technology
- develop and apply their analytic, problem-solving, design, and computational thinking skills
- understand how changes in technology affect safety, including new ways to protect their online privacy and identity, and how to report a range of concerns
Description
An advanced introduction to programming for middle school. Introduce programming fundamentals to your class as they build two arcade-inspired games from start to finish. The Adventure Game features a knight who has to defeat enemies to reach treasure. Students program arrow keys, fluid motion, hero and enemy behavior, and winning conditions. In Dragon Attack, they define multiple levels and lives, and program a boss enemy, while learning about variables and cloning.
Topics
- Events
- Keyboard and mouse interaction
- Conditional loops
- Nested loops
- Sending and receiving messages
- Fluid motion
- Parallax scrolling
- Local and global variables
- Functions
- Object cloning
What Students Learn
- Build complex multi-level games
- Use variables to keep score
- Use cloning to create actors programmatically
- Build algorithms using complex conditional logic
- Understand parallelism with multiple scripts
- Program different behaviors for different actors
- Publish projects to the Web
- 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.