Middle School course

Programming 201

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

Answer Key

Module 3: Add Background Music

Module 4: Animate the button

Module 6: Add Music

Module 7: Quiz

1. True or False: Sounds can be added to both Actors and the Stage.

  • True
  • False

2. True or False: Background music is added differently from sounds.

  • True
  • False

3. Which of the following blocks is used to play background music?

  • {"func":"blockControlWait","values":[{"type":"number","value":""}]}
  • {"func":"blockSoundPlayUntilDone","values":[{"type":"string","value":""}]}
  • {"func":"blockLooksNextCostume"}
  • {"func":"blockLooksSwitchCostume","values":[{"type":"string","value":""}]}

4. True or False: An Actor can only contain code for one sound at a time.

  • True
  • False

5. Which two blocks can be used to change the appearance of an Actor? (Choose 2)

  • {"func":"blockLooksSwitchCostume","values":[{"type":"string","value":""}]}
  • {"func":"blockSoundPlay","values":[{"type":"string","value":""}]}
  • {"func":"blockControlForever","containers":[null]}
  • {"func":"blockLooksNextCostume"}

6. Which code block should be added to the following code to make it look like the button is being pressed repeatedly until the end of the program?
{"func":"registerFlagTrigger","next":{"func":"blockControlWait","values":[{"type":"number","value":".5"}],"next":{"func":"blockLooksNextCostume","next":{"func":"blockControlWait","values":[{"type":"number","value":".5"}],"next":{"func":"blockLooksSwitchCostume","values":[{"type":"string","value":"blue button off"}]}}}}}

  • {"func":"blockControlForever","containers":[null]}
  • {"func":"blockControlRepeat","values":[{"type":"number","value":""}],"containers":[null]}
  • {"func":"blockLooksNextCostume"}
  • {"func":"blockLooksSwitchCostume","values":[{"type":"string","value":""}]}

7. True or False: If an Actor with the following code only had two costumes, we would be able to replace the {"func":"blockLooksSwitchCostume","values":[{"type":"string","value":""}]} block with the {"func":"blockLooksNextCostume"} block.
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"space"}],"next":{"func":"blockLooksNextCostume","next":{"func":"blockControlWait","values":[{"type":"number","value":".5"}],"next":{"func":"blockLooksSwitchCostume","values":[{"type":"string","value":"blue button off"}]}}}}

  • True
  • False

8. What will happen if we remove the 'Forever' block from this code?
{"func":"registerFlagTrigger","next":{"func":"blockControlForever","containers":[{"func":"blockSoundPlayUntilDone","values":[{"type":"string","value":"Easy Rider - bass"}]}]}}

  • The background music will play repeatedly until the program is stopped
  • The background music will only play once at the start of the program
  • The background music will not play
  • The background music will play if you click on the Actor

9. What key needs to be pressed to trigger the following code?
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"left arrow"}],"next":{"func":"blockLooksNextCostume","next":{"func":"blockControlWait","values":[{"type":"number","value":".5"}],"next":{"func":"blockLooksSwitchCostume","values":[{"type":"string","value":"blue button off"}]}}}}

  • The left arrow
  • The space bar
  • The right arrow
  • The return key

10. What will happen if we remove the 'Wait' block from the following code?
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"left arrow"}],"next":{"func":"blockLooksNextCostume","next":{"func":"blockControlWait","values":[{"type":"number","value":".5"}],"next":{"func":"blockLooksSwitchCostume","values":[{"type":"string","value":"blue button off"}]}}}}

  • The button will change costumes more slowly than before
  • The button will change costumes too fast to see
  • The button will not change costumes
  • The button will turn on and off twice

11. Which block is needed to switch to a specific costume?

  • {"func":"blockLooksSwitchCostume","values":[{"type":"string","value":""}]}
  • {"func":"blockLooksNextCostume"}
  • {"func":"blockSoundPlay","values":[{"type":"string","value":""}]}
  • {"func":"registerFlagTrigger"}

12. True or False: An Actor can have more than one costume.

  • True
  • False

13. True or False: An Actor cannot use the {"func":"blockLooksNextCostume"} block if it only has one costume.

  • True
  • False

14. What does the following code do?
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"space"}],"next":{"func":"blockSoundPlayUntilDone","values":[{"type":"string","value":"Easy Rider - bass"}]}}

  • Plays the background music once when space is pressed
  • Plays the background music forever when space is pressed
  • Plays the background music forever when the program starts
  • Plays the background music once when the program starts

15. How long does a 'Forever' block run?

  • A 'Forever' loop runs the code blocks inside it once
  • A 'Forever' loop repeats the code blocks inside it 10 times
  • A 'Forever' loop repeats the code blocks inside it over and over until the program ends
  • A 'Forever' loop repeats the code blocks inside it over and over even after the program ends

16. Which of the following code blocks is considered a loop?

  • {"func":"blockSoundPlay","values":[{"type":"string","value":""}]}
  • {"func":"blockControlForever","containers":[null]}
  • {"func":"blockControlWait","values":[{"type":"number","value":"1"}]}
  • {"func":"blockLooksSwitchCostume","values":[{"type":"string","value":""}]}

17. Where can the code block for background music be placed?

  • Only in the code for the Stage
  • Only in the code for an Actor
  • Either in the code for an Actor or in the code for the Stage
  • You do not need a code block to play background music in your program

18. What is the difference between the {"func":"blockLooksNextCostume"} and {"func":"blockSoundPlay","values":[{"type":"string","value":""}]} blocks?

  • The {"func":"blockLooksNextCostume"} block can be used to play music, while the {"func":"blockSoundPlay","values":[{"type":"string","value":""}]} block can be used to change the appearance of the Actor
  • The {"func":"blockLooksNextCostume"} block can be used to change the appearance of the Actor, while the {"func":"blockSoundPlay","values":[{"type":"string","value":""}]} block can be used to play music
  • Both of them are used to change the appearance of the Actor
  • Both of them can be used to play sounds

19. What costume will the button display after running the following code?
{"func":"blockLooksSwitchCostume","values":[{"type":"string","value":"blue button on"}],"next":{"func":"blockLooksSwitchCostume","values":[{"type":"string","value":"blue button off"}]}}

  • The button will be displaying the "blue button on" costume
  • The button will be displaying the "blue button off" costume
  • The button will be hidden
  • The button will display both costumes at the same time

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-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 10: Music and Animation

Course: | iPad Web

  • Introduction
  • Add Background Music Example
  • Add Background Music
  • Animate the button
  • Add Music Example
  • Add Music
  • 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