Problem 5 Example Solutions

Similar documents
Overview. Teacher s Manual and reproductions of student worksheets to support the following lesson objective:

Chapter 2: Lines And Points

Integer Chips. Explore Mode. In this tool, you can model and solve expressions using integer chips.

PHY221 Lab 1 Discovering Motion: Introduction to Logger Pro and the Motion Detector; Motion with Constant Velocity

Linkage 3.6. User s Guide

TABLE OF CONTENTS Introduction About Timo Kiander Step #1: Step #2: Step #3: Step #4: Step #5: Step #6: Step #7: Step #8: Step #9: Step #10:

(Skip to step 11 if you are already familiar with connecting to the Tribot)

Programs. onevent("can", "mousedown", function(event) { var x = event.x; var y = event.y; circle( x, y, 10 ); });

Background. About automation subtracks

LINE IN, LINE OUT AUDIO IN, AUDIO OUT FIXED, VARIABLE TO TV, VIDEO IN, VIDEO OUT Sony Electronics Inc. All rights reserved.

Taking Control of Your TV

Control4 Philips Hue Lighting Driver Version 8

Let's Learn About Notes

ILDA Image Data Transfer Format

DESIGN PRINCIPLES AND ELEMENTS. By Mark Gillan

3jFPS-control Contents. A Plugin (lua-script) for X-Plane 10 by Jörn-Jören Jörensön

VideoClock. Quick Start

Logic Design II (17.342) Spring Lecture Outline

YOUR MONEY LIFE: YOUR 50S BY PETER DUNN

evirtuoso-online Lessons

T/R 1: How many think one third? You all agree. Can you tell me why you would give it the number name one third?

Setting Up Your ThinkorSwim Charts for Beginners

EndNote Online. Getting Started Guide (Windows)

Logo Guidelines Version 1.1, September 2008

Capstone Experiment Setups & Procedures PHYS 1111L/2211L

PROCESSING YOUR EEG DATA

Remote Control Operation

Step by Step: Format a Research Paper GET READY. Before you begin these steps, be sure to launch Microsoft Word. Third line: History 101

CHEMISTRY SEMESTER ONE

Welcome Accelerated Algebra 2!

*High Frequency Words also found in Texas Treasures Updated 8/19/11

GCSE MARKING SCHEME AUTUMN 2017 GCSE MATHEMATICS NUMERACY UNIT 1 - INTERMEDIATE TIER 3310U30-1. WJEC CBAC Ltd.

Spinner- an exercise in UI development. Spin a record Clicking

A few quick notes about the use of Spectran V2

DIFFERENTIATE SOMETHING AT THE VERY BEGINNING THE COURSE I'LL ADD YOU QUESTIONS USING THEM. BUT PARTICULAR QUESTIONS AS YOU'LL SEE

Music 1. Aural Skills. Centre Number. Student Number. Do NOT write in this area. General Instructions

Alpharetta High School Orchestras Placement Audition Directions

Brand Guidelines. January 2015

Humorous Speech Contest Script

Product Specification

CIRCLE Progress Monitoring System STORY RETELL AND COMPREHENSION Instructions & Score Sheet

The Circle of Fifths *

Introduction to CMOS VLSI Design (E158) Lab 3: Datapath and Zipper Assembly

LINE IN, LINE OUT AUDIO IN, AUDIO OUT FIXED, VARIABLE TO TV, VIDEO IN, VIDEO OUT Sony Electronics Inc. All rights reserved.

10:30-11:00 FREEZE DANCE RHYMING GAME and FIND SUPER LETTERS

7thSense Design Delta Media Server

ICSA LABS LOGO USAGE GUIDELINES

Nintendo. January 21, 2004 Good Emulators I will place links to all of these emulators on the webpage. Mac OSX The latest version of RockNES

Line Spectra and Energy Levels. A Chem 101A Tutorial

VISSIM TUTORIALS This document includes tutorials that provide help in using VISSIM to accomplish the six tasks listed in the table below.

LINE IN, LINE OUT AUDIO IN, AUDIO OUT FIXED, VARIABLE TO TV, VIDEO IN, VIDEO OUT Sony Electronics Inc. All rights reserved.

Pitch correction on the human voice

Easy Peasy All-in-One High School American Literature Final Writing Project Due Day 180

CAMPAIGN TAGLINE GUIDELINES

About This Guide. About Church Motion Graphics

MODULE 4: Building with Numbers

SUSTAINABLE DEVELOPMENT GOALS

Lesson 25: Solving Problems in Two Ways Rates and Algebra

AUCA Standard Graphic Identity Manual

What makes a good logo?

Identification - electrical services

SuperStar Basics. Brian Bruderer. Sequence Editors

PRODUCTION OF. Ages. Ages Shows. Performance Guide. Series sponsor:

Mobile Math Teachers Circle The Return of the iclicker

9:15-9:45 GROW A LETTER! CRAFT ACTIVITY

LINE IN, LINE OUT AUDIO IN, AUDIO OUT FIXED, VARIABLE TO TV, VIDEO IN, VIDEO OUT Sony Electronics Inc. All rights reserved.

Graphic Standards. A guide to Lane s visual identity, with information on using the college logo, Lane colors and typefaces, stationery, and more.

A nice list for those who do not want to compile their own!

LINE IN, LINE OUT AUDIO IN, AUDIO OUT FIXED, VARIABLE TO TV, VIDEO IN, VIDEO OUT Sony Electronics Inc. All rights reserved.

Introduction. Overview. Organization

Logisim: A graphical system for logic circuit design and simulation

LINE IN, LINE OUT AUDIO IN, AUDIO OUT FIXED, VARIABLE TO TV, VIDEO IN, VIDEO OUT Sony Electronics Inc. All rights reserved.

PosDroid. Essential Guide to Menumate Handhelds

BRAND GUIDELINES VENDOR COPY AUGUST ecoatm BRAND GUIDELINES

AP Lit & Comp 9/27 9/28 17

Intra-frame JPEG-2000 vs. Inter-frame Compression Comparison: The benefits and trade-offs for very high quality, high resolution sequences

Apply(produc&on(methods(to(plan(and( create(advanced(digital(media(video( projects.

Calibrating the timecode signal input

Ratios. How are the numbers in each ad compared? Which ads are most effective?

Add Second Life to your Training without Having Users Log into Second Life. David Miller, Newmarket International.

PC/HDTV to PC/HDTV converter (CP-251F)

Usability Comparison of

The willing suspension of disbelief.

Final Projects. For ANY Novel. Unique & engaging projects with rubrics!

Activity #5: Reaction Timer Using the PIN and CON commands Real World Testing Chapter 3 Review Links

iii Table of Contents

Characterization and improvement of unpatterned wafer defect review on SEMs

After Effects Compositing Basics

Leonard Bernstein at 100 Centennial Logo Guide

Reading & Writing Workshop Suggested Sequence for Units of Study K-5 Sequence of Units. Kindergarten

Avast logo manual. Logo Overview

This document is downloaded from DR-NTU, Nanyang Technological University Library, Singapore.

L O G O G U I D E L I N E S J A N U A R Y

Reading & Writing Workshop Suggested Sequence for Units of Study K-5 Sequence of Units. Kindergarten

1 Ver.mob Brief guide

Brand standards and usage guidelines for partners

Hi, I m Gary Bouton and welcome to another Xara TV tutorial at Xaraxone.com.

Should you have any questions that aren t answered here, simply call us at Live Connected.

CSE Data Visualization. Color. Jeffrey Heer University of Washington

Project Design. Eric Chang Mike Ilardi Jess Kaneshiro Jonathan Steiner

Transcription:

Problem 5 Example Solutions This document provides pictures of a working Tynker program for both game options described. Keep in mind that these are example solutions. Problems can be solved computationally in many ways, so the best way to know if the solution is correct is by testing it! This document provides suggested solutions for teachers to refer to. Option 1: Color Confusion Game Stage Program 1. Clear the screen from any previous run of the program. 2. Initialize the score to 0. 3. Welcome the player then broadcast round 1 to begin. Note the wait blocks. If there are no wait blocks, programs will run too fast and the program might look like it missed a step, but it was just executing too quickly! 4. The two scripts about displaying score are a nice option to keep the player up to date with the score after each round (display score) as well as at the end of the game (display final score). PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 1

First Actor Program The code for the actors will be very similar. In fact, it is a copy/paste with minor edits for round numbers, color selection, and the text displayed. 2. When round 1 is broadcasted, the first actor should respond by going to the center of the screen (or any position the student would like!), becoming visible, and displaying the text of the color name (here it is orange) in a given font color (here it is also orange). Students can pick any color and combinations they like for this game. 3. Wait 1 second then hide again, clear the screen from the text drawn then broadcast to the next actor to start round 2. 4. When clicked the actor should either add a point to the score or subtract one. It depends on the case the student chooses to make for each round. In this case below, the color name matches its font color (orange) so it adds 1 point and broadcasts the display score message, which the Stage responds to. PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 2

Second Actor Program This is a copy of the previous actor, with minor edits for round numbers, color selection, and the text displayed. 2. When round 2 is broadcasted, the second actor should respond by going to the center of the screen (or any position the student would like!), becoming visible, and displaying the text of the color name (here it is blue) in a given font color (here it is dark red). Students can pick any color and combinations they like for this game. 3. Wait 1 second then hide again, clear the screen from the text drawn then broadcast to the next actor to start round 3. 4. When clicked the actor should either add a point to the score or subtract one. It depends on the case the student chooses to make for each round. In this case below, the color name does not match its font color so it subtracts 1 point and broadcasts the display score message, which the Stage responds to. PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 3

Third Actor Program This is a copy of the previous actor, with minor edits for round numbers, color selection, and the text displayed. 2. When round 3 is broadcasted, the third actor should respond by going to the center of the screen (or any position the student would like!), becoming visible, and displaying the text of the color name (here it is yellow) in a given font color (here it is blue). Students can pick any color and combinations they like for this game. 3. Wait 1 second then hide again, clear the screen from the text drawn then broadcast to the next actor to start round 4. 4. When clicked the actor should either add a point to the score or subtract one. It depends on the case the student chooses to make for each round. In this case below, the color name does not match its font color so it subtracts 1 point and broadcasts the display score message, which the Stage responds to. PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 4

Fourth Actor Program This is a copy of the previous actor, with minor edits for round numbers, color selection, and the text displayed. 2. When round 4 is broadcasted, the fourth actor should respond by going to the center of the screen (or any position the student would like!), becoming visible, and displaying the text of the color name (here it is red) in a given font color (here it is also red). Students can pick any color and combinations they like for this game. 3. Wait 1 second then hide again, clear the screen from the text drawn then broadcast to the next actor to start round 5. 4. When clicked the actor should either add a point to the score or subtract one. It depends on the case the student chooses to make for each round. In this case below, the color name matches its font color (red) so it adds 1 point and broadcasts the display score message, which the Stage responds to. PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 5

Fifth Actor Program This is a copy of the previous actor, with minor edits for round numbers, color selection, and the text displayed. 2. When round 5 is broadcasted, the fifth actor should respond by going to the center of the screen (or any position the student would like!), becoming visible, and displaying the text of the color name (here it is brown) in a given font color (here it is also brown). Students can pick any color and combinations they like for this game. 3. Wait 1 second then hide again, clear the screen from the text drawn then broadcast the display final score message which the Stage will respond to. 4. When clicked the actor should either add a point to the score or subtract one. It depends on the case the student chooses to make for each round. In this case below, the color name matches its font color (brown) so it adds 1 point. There is no need to broadcast the display score message since the display final score is called at the end of the when I receive round 5 script. PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 6

Option 2: Memory Game In this example solution, the balls will always be displayed in a straight horizontal line (with y = 200). The x positions will be 300, 100, 100, and 300. The actors that display the multiple choice answers will always appear in a vertical fashion (with x = 200). The y positions will be 300, 150, 0, and 150. Recall the game will look like this: Note that each round (aka sequence of balls to memorize) will require a new set of actors (like the four kid actors used here) to display the multiple choice answers so that when touched, it is clear to the actor which sequence was displayed and whether to give the player a point or take one away. This will cause some duplication of effort, which is why limiting this project to two or three rounds is plenty! There is another way to avoid the duplication and only use four actors by using a global variable. The code for Stage and Green Ball is shown at the end of this document. PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 7

Stage Program 1. Clear the screen from any previous run of the program. 2. Initialize the score to 0. 3. Welcome the player then broadcast round 1 to begin. Note the broadcast and wait blocks are best for this game since the stage will be controlling the entire game flow. So it calls for round 1, waits for it to complete, then calls for round 1 options (multiple choice answers) to appear, and then calls the next round, etc. Note that the extra 1 second waits in between are simply to add a short pause between the switches in display in the game, rather than everything switching quickly from one display to the next. 4. After all rounds have been played (the code below shows only two rounds but students can do more than that if time permits), the score is displayed. PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 8

Green Ball Program The code for the balls will be very similar. In fact, it is a copy/paste with minor edits for the x- and y-coordinates for each round. 2. When a round number is broadcasted, the ball will go to an x-y position then appear on the screen. It is up to the students to decide on the position of the ball on the screen. The example code below shows green all the way on the left (x = 300) in round 1 and in third position (x = 100) in round 2. 3. Wait 2 seconds then hide again. In this program, there is no need to broadcast to the next round, since the Stage is waiting for a round to complete and will broadcast the next round (difference between using broadcast and broadcast and wait blocks!) PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 9

Pink, Blue, and Orange Balls Programs The code is a copy of the previous ball with minor edits for the x- and y-coordinates for each round. 2. When a round number is broadcasted, the ball will go to an x-y position then appear on the screen. It is up to the students to decide on the position of the ball on the screen. 3. Wait 2 seconds then hide again. PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 10

PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 11

First Actor Program The code for the actors will also be very similar. In fact, it is a copy/paste with minor edits for the y-coordinates, the text displayed, and the score update. 2. When a broadcast for round 1 options is sent, the actor will go to its x-y position (see this game s introduction above) then appear on the screen. 3. The green code blocks show how to select a font color and size and draw the text at a specific x-y position. The key is to move it away from the actor just enough so it is not covered by the actor, but still close enough to be obvious that they go together! The player needs to click on the actor, not the text (the text does not detect the clicking event!) 4. Wait 5 seconds then hide again. 5. When the actor is touched, it will either add 1 point to the score or take away a point. For this specific actor, the answer it displayed was incorrect; therefore it subtracts 1 from the score. PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 12

Second, Third, and Fourth Actors Programs This is a copy of the previous actor, with minor edits for the text displayed and the y position. 2. When a broadcast for round 1 options is sent, the actor will go to its x-y position (see this game s introduction above) then appear on the screen. 3. Actor displays the text using the Drawing blocks. 4. Wait 5 seconds then hide again. 5. When the actor is touched, it will either add 1 point to the score or take away a point. The answer displayed by actors 2 and 4 are incorrect; therefore they subtract 1 from the score. Actor 3, showing the correct answer, adds 1 to it. PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 13

PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 14

Alternative Approach: Using a Global Variable As mentioned in the introduction to this game solution, there is a way to avoid duplicating the actors to display answers for each round. You will need to use a global variable which will be the indicator to the actors what sequence the balls were displayed in. The global variable round number will be created on the Stage and defined as a Global Variable. The stage can set that variable to the round number the game is in (like 1, 2, 3, etc.) Then in each of the four actors used to present the multiple choice answers, use an if-then-else statement that will check which round number it is and, based on that, determine which what action to take on the score. Stage Program The code is the same as the previous approach, except the new step where the stage sets the global variable round number before broadcasting the rounds. PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 15

Sample Actor Program The code below will be very similar for all four actors in the game. The code is the same as the previous approach, except for dealing with the score update. The actor will now need to check to see which round it is in the game, and decide whether to add or subtract a point. Let s say the sequence displayed in the text for this actor does NOT match the balls in round 1, but matches them in round 2. This code shows how to deal with that situation. The next question would be what if there are more than two rounds? Use as many nested if-then-else statements as needed. Here is an example: PLTW Launch Input/Output: Computer Systems Problem 5 Example Solutions Page 16