Elementary School course

Programming 101

  • GRADES 3-4
  • BEGINNER
  • WEB IPAD
  • 15 LESSONS
  • Voiceovers
Slide: 1 of 22

Answer Key

Module 4: Building the Maze

Module 5: Adding Maze Controls

Module 6: Finishing the Maze

Module 7: Add to the Maze Game

Module 8: Maze Control

Module 10: The Race Car

Module 11: Quiz

1. If you have 4 backgrounds and want to switch to a random one, which block should you put inside the {"func":"blockLooksSwitchBackground","values":[{"type":"string","value":""}]} block?

  • {"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"4"}]}
  • {"func":"blockLooksNextBackground"}
  • {"type":"wrapper","func":"valueLooksBackgroundName"}
  • {"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"0"},{"type":"number","value":"4"}]}

2. What is a quick way to move an Actor 10 pixels upwards without changing its direction?

  • {"func":"blockMotionChangeYBy","values":[{"type":"number","value":"10"}]}
  • {"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]}
  • {"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}
  • {"func":"blockMotionPointDirection","values":[{"type":"string","value":"0"}]}

3. In a maze with white walls, how can you check if an Actor is running into walls?

  • Use {"func":"blockLooksChangeEffect","values":[{"type":"choice","value":"color"},{"type":"number","value":"25"}]}
  • Use
    {"func":"blockControlIf","values":[{"type":"wrapper","func":"valueSensingTouchingColor","values":[{"type":"color","value":"#ffffff"}]}],"containers":[null]}
  • Use
    {"func":"blockControlForever","containers":[{"func":"blockMotionPointTowards","values":[{"type":"string","value":"mouse-pointer"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":".1"}]}}]}
  • Use {"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}

4. Nicole made a maze game with an exit sign so that the player knows where to go. Her exit sign is an Actor. How will she know if the player has reached the exit sign?

  • {"func":"blockControlIf","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"Exit Sign"}]}],"containers":[null]}
  • {"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}
  • {"func":"blockControlIf","values":[{"type":"wrapper","func":"valueSensingTouchedActorName"}],"containers":[null]}
  • {"func":"registerKeyTrigger","values":[{"type":"choice","value":"up arrow"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]}}

5. Joe made a maze game that has a "Game Over" display that should only show up when the player wins. However, when he starts playing the maze game, the "Game Over" display is always there, even while he's trying to play! What code did he forget?

  • {"func":"registerFlagTrigger","next":{"func":"blockLooksHide"}}
  • {"func":"blockLooksShow"}
  • {"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]}
  • {"func":"registerFlagTrigger","next":{"func":"blockLooksNextCostume"}}

6. If an Actor is moving forever but you want the user to be able to control what direction he moves in, what should you put under the {"func":"registerKeyTrigger","values":[{"type":"choice","value":""}]} blocks for each direction?

  • {"func":"blockMotionTurnCW","values":[{"type":"string","value":""}]} or {"func":"blockMotionTurnCCW","values":[{"type":"string","value":""}]}
  • {"func":"blockLooksShow"}
  • {"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]}
  • {"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}

7. Jessica has a background called "GameOver" that she displays when the player has won her game. She wants to stop all the sounds from playing when the "GameOver" background is being displayed. What code can she use?

  • {"func":"registerBackgroundChange","values":[{"type":"string","value":"GameOver"}],"next":{"func":"blockSoundStopAll"}}
  • {"func":"registerFlagTrigger","next":{"func":"blockSoundStopAll"}}
  • {"func":"blockSoundPlayUntilDone","values":[{"type":"string","value":""}]}
  • {"func":"blockLooksSwitchBackground","values":[{"type":"string","value":"GameOver"}]}

8. True or False: In programming, colors are represented by numbers like #000000.

  • True
  • False

9. True or False: The {"type":"wrapper","func":"valueSensingTouchingColor","values":[{"type":"color","value":"#ffffff"}]} block can go inside a conditional block like {"func":"blockControlIf","values":[{"type":"boolean","value":"false"}],"containers":[null]}

  • True
  • False

10. Nicole made a maze game with an exit sign so that the player knows where to go. Her exit sign is an Actor. How will she know if the player has reached the exit sign?

  • {"func":"blockControlIf","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"Exit Sign"}]}],"containers":[null]}
  • {"func":"blockMotionMove","values":[{"type":"number","value":"10"}]}
  • {"func":"blockControlIf","values":[{"type":"wrapper","func":"valueSensingTouchedActorName"}],"containers":[null]}
  • {"func":"registerTiltTrigger","values":[{"type":"choice","value":"forward"}],"next":{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}]}}

U.S. Standards

  • CCSS-Math: 3.NBT.A.2, MP.1
  • CCSS-ELA: RF.3.4.A, RF.4.4.A
  • CSTA: 1B-AP-10, 1B-AP-11, 1B-AP-12, 1B-AP-15
  • CS CA: 3-5.AP.13, 3-5.AP.14, 3-5.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

Lesson 15: Color Sensing

Course: | iPad Web

  • Dr. Glitch Takes Codey!
  • Concepts
  • Maze Game Example
  • Building the Maze
  • Adding Maze Controls
  • Finishing the Maze
  • Add to the Maze Game
  • Maze Control
  • The Race Car Example
  • The Race Car
  • Quiz

Description

An easy introduction to programming for beginners in lower elementary grades. Familiarize your class with visual programming techniques. Students progress through the lessons learning concepts in a game-like interface. To complete each lesson, students typically go through a concept review, solve a puzzle, run through a tutorial, build their own project, and take a quiz. They create interactive stories, animations, and mini-games to help Professor Ada battle the evil Dr. Glitch! After completing this lesson plan, students will be able to build a wide variety of simple programs with events, loops, and some conditional logic.

Topics

  • Sequencing
  • Repetition
  • Events
  • Conditional logic
  • Animation
  • Pen drawing
  • Drawing shapes and patterns
  • Playing musical notes
  • Sending and receiving messages
  • Handling user input
  • Color detection

What Students Learn

  • Design animated characters
  • Create interactive scenes
  • Make animated birthday cards
  • Write cartoon stories
  • Create a music machine
  • Experiment with math art
  • Design and build small games
  • 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