Middle School course

Programming 202

  • GRADES 5-6
  • INTERMEDIATE
  • WEB IPAD
  • 16 LESSONS
Slide: 1 of 24

Answer Key

Module 5: Stack the Blocks

Module 6: Stack 'em up

Module 8: Make a Structure

Module 9: Quiz

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

  • It places the Actor at the given x and y position
  • It animates the Actor moving towards the given x and y position
  • It points the Actor in the direction of the given x and y position
  • It helps the Actor change costumes

2. What would happen if we changed the value inside this code block from 90 to 180? {"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}]}

  • The Actor would fall to the ground faster
  • The Actor would be oriented vertically instead of horizontally
  • The Actor would remain oriented horizontally
  • The Actor would be oriented diagonally instead of horizontally

3. How could we change this code block to make the Actor fall faster? {"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetGravity","values":[{"type":"number","value":"0"},{"type":"number","value":"20"}],"next":{"func":"blockPhysicsSetGeometry","values":[{"type":"choice","value":"rectangular"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":0}]}}}}}

  • Change the {"func":"blockPhysicsSetGravity","values":[{"type":"number","value":"0"},{"type":"number","value":"20"}]} block to {"func":"blockPhysicsSetGravity","values":[{"type":"number","value":"0"},{"type":"number","value":"30"}]}
  • Change the {"func":"blockMotionPointDirection","values":[{"type":"string","value":"0"}]} to {"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}]}
  • Change the {"func":"blockPhysicsSetGeometry","values":[{"type":"choice","value":"rectangular"}]} block to {"func":"blockPhysicsSetGeometry","values":[{"type":"choice","value":"circular"}]}
  • Remove the {"func":"blockPhysicsStart"} block

4. What does the {"func":"blockPhysicsStart"} block do?

  • It enables physics, allowing the Actors on the Stage to collide and fall
  • It enables animations
  • It enables the space theme
  • It allows you to move Actors left and right with the arrow keys

5. What does the {"func":"blockPhysicsSetGeometry","values":[{"type":"choice","value":"rectangular"}]} block do?

  • It makes the Actor collide like a rectangle when physics are enabled
  • It makes the Actor collide like a circle when physics are enabled
  • It changes the appearance of the Actor into a rectangle
  • It changes the appearance of the Actor into a circle

6. What does this code block do? {"func":"registerSpriteTrigger","next":{"func":"blockPhysicsStart"}}

  • It applies physics to the Actor when the program is started
  • It applies physics to the Actor when anything is clicked
  • It applies physics to the Actor when the Actor is clicked
  • It applies physics to the Actors when space is pressed

7. What block should you use to make a cannonball collide correctly?

  • {"func":"blockPhysicsSetGeometry","values":[{"type":"choice","value":"rectangular"}]}
  • {"func":"blockPhysicsSetGeometry","values":[{"type":"choice","value":"circular"}]}
  • {"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}
  • {"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}]}

8. What will happen if we remove the {"func":"registerFlagTrigger"} block from this code block? {"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetGeometry","values":[{"type":"choice","value":"rectangular"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":0}],"next":{"func":"blockMotionGoTo","values":[{"type":"number","value":"-202"},{"type":"number","value":"-299"}]}}}}}

  • The Actor will not be affected by physics at the start of the program
  • The Actor will be affected by physics when the program is started
  • The Actor will be affected by physics when it is clicked
  • The Actor will stop being affected by physics when it is clicked

9. True or false: Using the {"func":"blockPhysicsSetGeometry","values":[{"type":"choice","value":""}]} block changes the appearance of the Actor.

  • True
  • False

10. True or false: The Actor will still fall if you remove all {"func":"blockPhysicsStart"} blocks from the project.

  • True
  • False

11. True or false: The Actors on the Stage will not fall if you use this block. {"func":"blockPhysicsSetGravity","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}

  • True
  • False

12. True or false: The Actor will fall downwards if you place it at the top of the screen and use the {"func":"blockPhysicsStart"} block.

  • True
  • False

13. What would this code block do to an Actor? {"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}

  • This will place the Actor in the center of the Stage
  • This will place the Actor in the bottom right corner of the Stage
  • This will place the Actor in the top left corner of the Stage
  • This will place the Actor in the bottom left corner of the Stage

14. True or false: You can only use physics on one Actor at a time.

  • True
  • False

15. Which of these are effects of gravity? (Choose two.)

  • It causes Actors to fall to the ground
  • It causes Actors to grow and shrink
  • It causes Actors to move without anything touching them
  • It causes Actors to disappear

16. True or false: Rectangular shapes cannot collide with circular shapes.

  • True
  • False

17. Which of these blocks would be used to make a plank collide correctly?

  • {"func":"blockPhysicsSetGeometry","values":[{"type":"choice","value":"rectangular"}]}
  • {"func":"blockPhysicsSetGeometry","values":[{"type":"choice","value":"circular"}]}
  • {"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}
  • {"func":"blockMotionPointDirection","values":[{"type":"string","value":"90"}]}

18. What would happen if you changed {"func":"blockPhysicsSetGravity","values":[{"type":"number","value":"0"},{"type":"number","value":"10"}]} to {"func":"blockPhysicsSetGravity","values":[{"type":"number","value":"10"},{"type":"number","value":"0"}]}?

  • Actors would fall sideways instead of downwards
  • Actors would be affected by gravity normally
  • Actors would fall upwards instead of downwards
  • Actors would not move at all when physics were started

19. Tyler wants to create a car with wheels which are separate Actors. What block would he need to have the wheels collide correctly with the ground?

  • {"func":"blockPhysicsSetGeometry","values":[{"type":"choice","value":"rectangular"}]}
  • {"func":"blockPhysicsSetGeometry","values":[{"type":"choice","value":"circular"}]}
  • {"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}
  • {"func":"blockLooksHide"}

20. Which of these blocks could you use if you no longer wanted your Actors to fall or collide with one another?

  • {"func":"blockPhysicsSetGeometry","values":[{"type":"choice","value":"rectangular"}]}
  • {"func":"blockPhysicsStart"}
  • {"func":"blockPhysicsStop"}
  • {"func":"blockMotionGoTo","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}

U.S. Standards

  • CCSS-Math: 5.G.A.1, 6.NS.C.6, 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

Lesson 9: The Physics Engine

Course: | iPad Web

  • Introduction
  • Play the Game
  • Concepts
  • Stack the Blocks Example
  • Stack the Blocks
  • Stack 'em up
  • Make a Structure Example
  • Make a Structure
  • Quiz

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