problem 5 brain fitness · pltw launch – input/output: computer systems problem 5 brain fitness...

12
© 2015 Project Lead The Way, Inc. PLTW Launch Input/Output: Computer Systems Problem 5 Brain Fitness Page 1 Problem 5 Brain Fitness Introduction Remember how Angelina, Mylo, and Suzi talked about concussions and baseline testing? Concussions happen quite frequently in sports. Many schools today require baseline testing for students before they participate in sports. Baseline testing helps coaches and doctors to know how a player’s brain normally works. That way, if the player is injured, they can have the player retake the test and compare the results to the baseline test results to see if the player might have a concussion. There are many ways to test memory and reaction time for baseline concussion testing. In this problem, you will work with your group to create your own baseline testing app in Tynker. In the previous activities and project, you learned a lot about programming and using Tynker. Now it’s time for you to use all those skills and get creative! Equipment Launch Log Tablet Tablet applications o Canvas by Instructure o TynkerProcedure 1. You may choose to create your own brain fitness tool or you can pick one of the two Color Confusion games described below. Regardless of what you choose to build, your solution must meet these minimum requirements. Solution Criteria Two or more actors Receives input from the user (e.g., tapping or tilting) Displays score or ranking at the end of the game

Upload: others

Post on 20-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

  • © 2015 Project Lead The Way, Inc. PLTW Launch – Input/Output: Computer Systems Problem 5 Brain Fitness – Page 1

    Problem 5 Brain Fitness

    Introduction

    Remember how Angelina, Mylo, and Suzi talked about concussions and baseline testing? Concussions happen quite frequently in sports. Many schools today require baseline testing for students before they participate in sports. Baseline testing helps coaches and doctors to know how a player’s brain normally works. That way, if the player is injured, they can have the player retake the test and compare the results to the baseline test results to see if the player might have a concussion.

    There are many ways to test memory and reaction time for baseline concussion testing. In this problem, you will work with your group to create your own baseline testing app in Tynker. In the previous activities and project, you learned a lot about programming and using Tynker. Now it’s time for you to use all those skills and get creative!

    Equipment

    Launch Log

    Tablet

    Tablet applications

    o Canvas by Instructure

    o Tynker™

    Procedure

    1. You may choose to create your own brain fitness tool or you can pick one of the two Color Confusion games described below. Regardless of what you choose to build, your solution must meet these minimum requirements.

    Solution Criteria

    Two or more actors

    Receives input from the user (e.g., tapping or tilting)

    Displays score or ranking at the end of the game

  • © 2015 Project Lead The Way, Inc. PLTW Launch – Input/Output: Computer Systems Problem 5 Brain Fitness – Page 2

    2. The two options for Color Confusion games are described in the tables below. Tips for building the games are provided at the end of this document.

    Option 1: Color Confusion Word Game

    Actors take turns appearing on the screen and displaying the name of a color.

    If the color of the text matches the color name it displays, the player must tap on its actor to get a point.

    Tapping on actors that have mismatched color-text combinations will make them lose a point.

    The game should present the user with at least five color-text combinations.

    When the game is over, display a message announcing the end of the game and the final score.

    An example of a color-text combination for this game:

    Option 2: Color Confusion Memory Game

    A sequence of colored balls appears on the screen for a few seconds then disappears.

    The player is presented with four options, each displaying a unique sequence of colors.

    The player has to tap on the actor that is displaying the sequence in which the balls were displayed.

    Tapping on the correct sequence earns the player a point.

  • © 2015 Project Lead The Way, Inc. PLTW Launch – Input/Output: Computer Systems Problem 5 Brain Fitness – Page 3

    Tapping on an incorrect sequence loses a point.

    The game should present the user with at least three rounds (so the player’s max score can be 3).

    When the game is over, display a message announcing the end of the game and the final score.

    An example of a color-text combination for this game:

    3. Open to the Ask section towards the end of your Launch Log where you will find a guide to using the Design Process. The steps below will help you go through the five steps of the design process as you develop your solution.

    4. Design Process Step 1: Ask

    Use the information about the required criteria to answer the questions in your Launch Log.

    a. What is the need or want that we are trying to fulfill?

    Go back and read the original problem as described in the Introductory Story for this module.

    b. What will make the solution successful?

    Consider the requirements you have been given. Describe how to meet each of those criteria in the solution.

    Write down anything additional that you think will make the solution successful.

    This list of things you have learned how to do in Tynker might give you good ideas:

  • © 2015 Project Lead The Way, Inc. PLTW Launch – Input/Output: Computer Systems Problem 5 Brain Fitness – Page 4

    o User actions: tilting and tapping

    o Actor abilities: move, say, draw (using pen), hide/show

    o Programming: forever loops, conditional logic (if-then-else), variables, timer, events (see next bullet)

    o Game events: on start, when actor is tapped, when true occurs (like checking for an actor touching another actor or checking for a condition, like timer or score)

    c. What constraints will impact the solution?

    Think about things that may be restrictions, like the capabilities of the programming tool you are using or the amount of time you have.

    5. Design Process Step 2: Explore

    a. This part of the design process is about finding out more information about the problem and brainstorming ideas for a solution. You might want to start by just listing as many ideas as you can think of. Be as creative as you can because this is the part of the design process where great things happen!

    b. For computer science, this step is where you consider different algorithms that would solve the problem. You may review the work you have done for the activity and project in Tynker and explore some more options in the Tynker code drawers. Write down ideas about how the characters would move and interact and any other details you can think of. It’s all right if you have a few different ideas at this time; just make notes in your Launch Log. You may use the graph paper or the lines to record your ideas.

    6. Design Process Step 3: Model

    a. Your Launch Log provides a Decision Matrix that you can use to compare different solution ideas you may have. You may skip over this step if you know which of your ideas you would like to create. If you are undecided about which of your ideas to build, you may want to use the Matrix. In that case, ask your teacher for more information about how to best use the Decision Matrix.

    b. In computer programming, the Model step of the design process is where you actually write code and create a project that fulfills the design criteria and solves the problem. That means you can start working in Tynker now!

    Remember to use the rules of pair programming as you work with your partner to build a game that solves the problem.

    c. Use the graph paper in your Launch Log if you need to work out anything while you program your game in Tynker.

    d. Draw at least one sketch of your solution. This could be a picture of the main characters in your game with notes on how they interact and what rules they will follow.

    7. Design Process Step 4: Evaluate

  • © 2015 Project Lead The Way, Inc. PLTW Launch – Input/Output: Computer Systems Problem 5 Brain Fitness – Page 5

    a. Describe how you will evaluate or test your solution.

    Write a short list of things you will do to check that your game works and meets the requirements. Here are some ideas:

    o Play your game to make sure that it does what you expected it to do.

    o Double check that your solution meets all of the design requirements.

    o Do user testing by allowing someone outside of your group to try out the game.

    o If anything goes wrong (in computer science that is called a bug), then you will go back to the design process step 3 (Model) to fix your program.

    b. Your Launch Log says, “If appropriate, conduct and document a controlled test.” A controlled test means that you conduct a test that you know should work. You will avoid changing too many things at once while you are testing a solution. In computer science it is not always necessary to run a controlled test. For the solution you are developing, you should test the program with several different test cases and make sure that the program performs as you expected.

    c. Use evidence to identify parts of your design solution that can be improved.

    Based on your own testing and watching others use your game, make a list of things that could be changed.

    Go through the list and figure out which things are necessary and which are “nice to have.”

    Go back to the design process Model step to fix the bugs that are necessary. After you’ve done that, do another round of testing. Computer scientists usually complete cycles of building, testing, and fixing before they get a program that works correctly. Finding and fixing errors is a normal part of programming!

    8. Design Process Step 5: Explain

    a. Summarize and share your solution.

    In the explain section of your Launch Log, write a few sentences about what you built. What does it do and how does it work? Write out what you would say to someone who said, “Tell me about your solution.”

    b. Provide suggestions for improvement using evidence.

    Using evidence means that you have facts to support the statement you are making.

    If you have obtained information from testing that shows that your solution could be improved, write down that information and then write down how you would fix or improve your solution to solve

  • © 2015 Project Lead The Way, Inc. PLTW Launch – Input/Output: Computer Systems Problem 5 Brain Fitness – Page 6

    the issue. For example you can write, “We observed that some people who played our game got frustrated that the main character moves too slowly. We could give the player a choice of how quickly the main character moves.”

    Conclusion Questions

    1. While building the solution, you had to make sure you were meeting the design criteria. Explain why it is helpful to know the requirements of a project before you start working on it.

    2. When you identified smaller problems to solve, did you discover something that could be accomplished with a loop or a conditional? Describe one loop or conditional in your solution.

    Option 1: Color Confusion Word Game (Less Complex)

    To help you through this problem, here are some helpful tips to keep in mind.

    1. This is a very repetitive game. Once you develop the code for one actor, the rest will be very similar.

    2. Here is a flowchart that can help you organize your plan for building the game.

  • © 2015 Project Lead The Way, Inc. PLTW Launch – Input/Output: Computer Systems Problem 5 Brain Fitness – Page 7

  • © 2015 Project Lead The Way, Inc. PLTW Launch – Input/Output: Computer Systems Problem 5 Brain Fitness – Page 8

    3. The flowchart shows you the general flow of the game.

    4. The game can have many actors but it is best to start with one actor and make sure it works well before adding more actors.

    5. You may always refer back to Activity 3 and Project 4 if you need help with some of the code specifics.

    6. Code Tips:

    a. When creating the variable score on the Stage, make sure it is a global variable this time since it will be updated by multiple actors.

    b. To display a welcome message on the top of the screen, use the Say method on the Stage.

    c. To have actors communicate with each other (like tell an actor to do something), you can use the broadcast block. Make sure to send a unique broadcast message each time and have the appropriate actor respond to that message.

    d. Make sure that when the game starts all actors are hidden. They should only appear when they receive the broadcast message they need.

    e. It is up to you to put these actors in the location you like. You may have all actors appear in the same position on the x-y grid, or you can choose to give them different positions on the screen.

    f. When actors appear on the screen, they will need to display a color name in a specific colored text. Use the Drawing blocks below to set the font color and size, and then draw the text.

  • © 2015 Project Lead The Way, Inc. PLTW Launch – Input/Output: Computer Systems Problem 5 Brain Fitness – Page 9

    g. Since this is a brain fitness tool, the user will need to tap on the correct actors quickly before they disappear again. So make sure you code for that in your program (see flowchart steps for each actor).

    h. Each actor must react to a tap from the user. Based on whether the actor is displaying a match or not, the code should either add or subtract from the variable score.

    i. After your last actor disappears, make sure to have the stage display the message that the game is over and show the score to the user.

    Option 2: Color Confusion Memory Game (More Complex)

    To help you through this problem, here are some helpful tips to keep in mind.

    1. This is a very repetitive game. Once you develop the code for one round, the rest will be very similar.

    2. Here is a flowchart that can help you organize your plan for building the game.

  • © 2015 Project Lead The Way, Inc. PLTW Launch – Input/Output: Computer Systems Problem 5 Brain Fitness – Page 10

    3. The flowchart shows you the general flow of the game.

  • © 2015 Project Lead The Way, Inc. PLTW Launch – Input/Output: Computer Systems Problem 5 Brain Fitness – Page 11

    4. The game can have many rounds but it is best to start with one actor and make sure it works well before adding more actors.

    5. You may always refer back to Activity 3 and Project 4 if you need help with some of the code specifics.

    6. Code Tips:

    a. When creating the variable score on the Stage, make sure it is a global variable this time since it will be updated by multiple actors.

    b. To display a welcome message on the top of the screen, use the Say method on the Stage.

    c. To have actors communicate with each other (like tell an actor to do something), you can use the broadcast block. Make sure to send a unique broadcast message each time (like round 1, round 2, etc…) and have the appropriate actors respond to that message.

    d. Make sure that when the game starts all actors are hidden. They should only appear when they receive the broadcast message they need.

    e. When actors appear on the screen, they will need to display the text options. Use the Drawing blocks below to set the font color and size, and then draw the text.

    f. Since this is a brain fitness tool, the user will need to tap on the correct actors quickly before they disappear again. So make sure you code for that in your program (see flowchart steps for each actor).

    g. Each actor is required to react to a tap from the user. Based on whether the actor is displaying the correct answer or not, add code to either add or subtract from the variable score.

  • © 2015 Project Lead The Way, Inc. PLTW Launch – Input/Output: Computer Systems Problem 5 Brain Fitness – Page 12

    h. After your last actor disappears, make sure to have the stage display the message that the game is over and show the score to the user.