Middle School course

Programming 201

  • GRADES 5-6
  • BEGINNER
  • WEB IPAD
  • 17 LESSONS
Slide: 1 of

Answer Key

Module 3: Move Back and Forth

Module 4: Move and Collect Power Cells

Module 6: Make Actors Move

Module 7: Quiz

1. What happens when you change the {"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]}} code block to the {"func":"registerKeyTrigger","values":[{"type":"choice","value":"left arrow"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]}} code block?

  • The Actor will move right when you hold the right arrow
  • The Actor will move right when you hold the left arrow
  • The Actor will move left when you hold the left arrow
  • Nothing will change

2. How can you make the Actor with the following code move faster while walking?
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]}}

  • Change X by a greater amount
  • Include a 'Next Costume' block
  • Include a 'Wait' block
  • Include a 'Repeat' block

3. What happens if you replace the {"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]} block with the {"func":"blockMotionChangeXBy","values":[{"type":"number","value":"-10"}]} block?

  • The Actor will move left instead of right
  • The Actor will move slower
  • The Actor will jump
  • The Actor will move faster

4. What happens if you replace the
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"up arrow"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"5"}],"next":{"func":"blockLooksNextCostume","next":{"func":"blockControlWait","values":[{"type":"number","value":"0.05"}]}}}]}}
code block with the
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"up arrow"}],"next":{"func":"blockControlForever","containers":[{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"5"}],"next":{"func":"blockLooksNextCostume","next":{"func":"blockControlWait","values":[{"type":"number","value":"0.05"}]}}}]}} code block?

  • The Actor will move up 10 pixels
  • The Actor will move up and off the screen
  • The Actor will disappear instantly
  • The Actor will move faster

5. What happens if an Actor only has one Costume?

  • The Actor will still animate correctly
  • The Actor will disappear
  • The Actor will always look the same
  • The Actor will not be able to move left or right

6. What is the difference between the {"func":"blockMotionChangeXBy","values":[{"type":"number","value":""}]} block and the {"func":"blockMotionChangeYBy","values":[{"type":"number","value":""}]} block?

  • {"func":"blockMotionChangeXBy","values":[{"type":"number","value":""}]} moves the Actor up and down, while {"func":"blockMotionChangeYBy","values":[{"type":"number","value":""}]} moves the Actor left and right
  • {"func":"blockMotionChangeXBy","values":[{"type":"number","value":""}]} only moves the Actor right, while {"func":"blockMotionChangeYBy","values":[{"type":"number","value":""}]} only moves the Actor up
  • {"func":"blockMotionChangeXBy","values":[{"type":"number","value":""}]} moves the Actor left and right, while {"func":"blockMotionChangeYBy","values":[{"type":"number","value":""}]} moves the Actor up and down
  • {"func":"blockMotionChangeXBy","values":[{"type":"number","value":""}]} and {"func":"blockMotionChangeYBy","values":[{"type":"number","value":""}]} can be used interchangeably

7. Which of these sets of code will cause an Actor to end up where it started?

  • {"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"-10"}]}}}
  • {"func":"blockMotionChangeXBy","values":[{"type":"number","value":"5"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"-10"}]}}
  • {"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"5"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"-10"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"-5"}]}}}}
  • {"func":"blockMotionChangeXBy","values":[{"type":"number","value":"-5"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"5"}]}}

8. Which of the following code blocks should you use to make the Actor move off the screen by pressing the right arrow once?

  • {"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}}
  • {"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"100"}]}}
  • {"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockControlForever","containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}]}}
  • {"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}]}}

9. In what directions will the following code cause the Actor to move?
{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"10"}]}}

  • Right and up
  • Left and down
  • Left and up
  • Right and down

10. What will happen if you change the repeat value from 10 to 20 in the following code?
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"5"}],"next":{"func":"blockLooksNextCostume","next":{"func":"blockControlWait","values":[{"type":"number","value":"0.05"}]}}}]}}

  • The Actor will move double the distance
  • The Actor will go through twice as many costumes
  • The Actor will move double the distance and go through twice as many costumes
  • The Actor will move the same distance as before

11. What will happen if you remove the {"func":"blockControlWait","values":[{"type":"number","value":".05"}]} block in the following code?
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"5"}],"next":{"func":"blockLooksNextCostume","next":{"func":"blockControlWait","values":[{"type":"number","value":"0.05"}]}}}]}}

  • The animation will be too fast for you to see
  • The animation will look the same
  • The Actor will move off the screen
  • The Actor will not change costumes

12. What will happen if you remove the {"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[null]} block in the following code?
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"5"}],"next":{"func":"blockLooksNextCostume","next":{"func":"blockControlWait","values":[{"type":"number","value":"0.05"}]}}}]}}

  • The Actor will only move 10 pixels at a time
  • The Actor will only change one costume at a time
  • The 'Wait' block will still be necessary
  • The Actor will animate normally

13. True or False: You can make an Actor move diagonally.

  • True
  • False

14. True or False: The following code is the most efficient way to make an actor move 30 pixels up.
{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"10"}]}}}

  • True
  • False

15. What will the following code make an Actor do?
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"20"}],"containers":[{"func":"blockControlWait","values":[{"type":"number","value":".05"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"10"}]}}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"20"}],"containers":[{"func":"blockControlWait","values":[{"type":"number","value":".05"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"-10"}]}}]}}}

  • It makes the Actor jump when the right arrow is pressed
  • It makes the Actor move right when the right arrow is pressed
  • It makes the Actor jump when space is pressed
  • It makes the Actor move right when space is pressed

16. What will happen if you remove the {"func":"blockLooksNextCostume"} block from the following code?
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"20"}],"containers":[{"func":"blockControlWait","values":[{"type":"number","value":".05"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockLooksNextCostume"}}}]}}

  • The Actor will move right but will not change costumes
  • The Actor will not change
  • The Actor will move right too fast to see
  • The Actor will animate but it will not move

17. What will happen if you remove the {"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]} block from the following code?
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"20"}],"containers":[{"func":"blockControlWait","values":[{"type":"number","value":".05"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockLooksNextCostume"}}}]}}

  • The Actor will move right but will not change costumes
  • The Actor will not change
  • The Actor will move right too fast to see
  • The Actor will animate but it will not move

18. Which of these code blocks will cause the Actor to move down and to the left?

  • {"func":"blockMotionChangeYBy","values":[{"type":"number","value":"-10"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"-10"}]}}
  • {"func":"blockMotionChangeYBy","values":[{"type":"number","value":"-10"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]}}
  • {"func":"blockMotionChangeYBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"-10"}]}}
  • {"func":"blockMotionChangeYBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]}}

19. Two Actors, Jack and Jill, both start off at the same position. Jack uses the {"func":"blockMotionChangeXBy","values":[{"type":"number","value":"-10"}]} code block, while Jill uses the {"func":"blockMotionChangeXBy","values":[{"type":"number","value":"-30"}]} code block. Who ends up on the right?

  • Jack
  • Jill

20. What will happen when you change the {"func":"registerTiltTrigger","values":[{"type":"choice","value":"right"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]}} code block to the {"func":"registerTiltTrigger","values":[{"type":"choice","value":"left"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]}} code block?

  • The Actor will move right when you tilt the device to the right
  • The Actor will move right when you tilt the device to the left
  • The Actor will move left when you tilt the device to the left
  • Nothing would be changed

21. How can you make the Actor with the following code move faster while walking?
{"func":"registerTiltTrigger","values":[{"type":"choice","value":"right"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]}}

  • Change X by a greater amount
  • Include a 'Next Costume' block
  • Include a 'Wait' block
  • Include a 'Repeat' block

22. What will happen if you replace the first code block with the second?
1) {"func":"registerTiltTrigger","values":[{"type":"choice","value":"forward"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"5"}],"next":{"func":"blockLooksNextCostume","next":{"func":"blockControlWait","values":[{"type":"number","value":"0.05"}]}}}]}}
2){"func":"registerTiltTrigger","values":[{"type":"choice","value":"forward"}],"next":{"func":"blockControlForever","containers":[{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"5"}],"next":{"func":"blockLooksNextCostume","next":{"func":"blockControlWait","values":[{"type":"number","value":"0.05"}]}}}]}}

  • The Actor will move up 10 pixels
  • The Actor will move up and off the screen
  • The Actor will disappear instantly
  • The Actor will move faster

23. Which code block would you use to move the Actor off the screen by tilting the device briefly to the right and then back to center exactly once?

  • {"func":"registerTiltTrigger","values":[{"type":"choice","value":"right"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}}
  • {"func":"registerTiltTrigger","values":[{"type":"choice","value":"right"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"100"}]}}
  • {"func":"registerTiltTrigger","values":[{"type":"choice","value":"right"}],"next":{"func":"blockControlForever","containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}]}}
  • {"func":"registerTiltTrigger","values":[{"type":"choice","value":"right"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}]}}

24. What will happen if you change the repeat value from 10 to 20 in the following code?
{"func":"registerTiltTrigger","values":[{"type":"choice","value":"right"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"5"}],"next":{"func":"blockLooksNextCostume","next":{"func":"blockControlWait","values":[{"type":"number","value":"0.05"}]}}}]}}

  • The Actor will move double the distance
  • The Actor will go through twice as many costumes
  • The Actor will move double the distance and go through twice as many costumes
  • The Actor will move the same distance as before

25. What will happen if you remove the {"func":"blockControlWait","values":[{"type":"number","value":".05"}]} block from the following code?
{"func":"registerTiltTrigger","values":[{"type":"choice","value":"right"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"5"}],"next":{"func":"blockLooksNextCostume","next":{"func":"blockControlWait","values":[{"type":"number","value":"0.05"}]}}}]}}

  • The animation will be too fast for you to see
  • The animation will look the same
  • The Actor will move off the screen
  • The Actor will not change costumes

26. What will happen if you remove the {"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[null]} block from the following code?
{"func":"registerTiltTrigger","values":[{"type":"choice","value":"right"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"5"}],"next":{"func":"blockLooksNextCostume","next":{"func":"blockControlWait","values":[{"type":"number","value":"0.05"}]}}}]}}

  • The Actor will only move 10 pixels at a time
  • The Actor will only change one costume at a time
  • The 'Wait' block will still be necessary
  • The Actor will animate normally

27. What will the following code make an Actor do?
{"func":"registerTiltTrigger","values":[{"type":"choice","value":"right"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"20"}],"containers":[{"func":"blockControlWait","values":[{"type":"number","value":".05"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"10"}]}}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"20"}],"containers":[{"func":"blockControlWait","values":[{"type":"number","value":".05"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"-10"}]}}]}}}

  • It makes the Actor jump when the device is tilted right
  • It makes the Actor to move right when the device is tilted right
  • It makes the Actor jump when the screen is touched
  • It makes the Actor to move right when the screen is touched

28. What will happen if you remove the {"func":"blockLooksNextCostume"} block from the following code?
{"func":"registerTiltTrigger","values":[{"type":"choice","value":"right"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"20"}],"containers":[{"func":"blockControlWait","values":[{"type":"number","value":".05"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockLooksNextCostume"}}}]}}

  • The Actor will move right but will not change costumes
  • The Actor will not change
  • The Actor will move right too fast to see
  • The Actor will animate but it will not move

29. What will happen if you remove the {"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]} block from the following code?
{"func":"registerTiltTrigger","values":[{"type":"choice","value":"right"}],"next":{"func":"blockControlRepeat","values":[{"type":"number","value":"20"}],"containers":[{"func":"blockControlWait","values":[{"type":"number","value":".05"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockLooksNextCostume"}}}]}}

  • The Actor will move right but it will not change costumes
  • The Actor will not change
  • The Actor will move right too fast to see
  • The Actor will animate but it will not move

U.S. Standards

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

Course: | iPad Web

  • Move to Collect Power Cells
  • Move Back and Forth Example
  • Move Back and Forth
  • Move and Collect Power Cells
  • Make Actors Move Example
  • Make Actors Move
  • Quiz

Description

An introduction to programming for beginners in upper elementary grades. Introduce your class to programming using a fun scenario-based approach where they build two complete games. Side Scroller Survival introduces them to basics of motion and animation. In BeatBot Battle, they program a robot to make it dance. On completing this lesson plan students will be able to build simple games, animations, and a variety of simple projects.

Topics

  • Use sequencing
  • Pattern recognition
  • Loops
  • Conditional logic
  • Create scenes
  • Add sounds and music
  • Use keyboard controls
  • Learn about motion
  • Broadcasting messages
  • Adding special effects

What Students Learn

  • Create interactive scenes with actors, scenes and music
  • Design animations using loops
  • Program motion along x- and y-axes
  • Build algorithms using conditional logic
  • Understand scripts running in parallel
  • Program music using notes, tempo and instruments
  • Create different scenarios and effects in games
  • Publish projects to the Web
  • Troubleshoot and debug simple 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