Concussion App

21
Concussion App Objectives: 1.Explain how sequence, selection, and iteration are building blocks of algorithms 2.Create equations with two or more variables to represent relationships among quantities.

description

Concussion App. Objectives: Explain how sequence, selection, and iteration are building blocks of algorithms Create equations with two or more variables to represent relationships among quantities. Warm-Up. C = 3 V + 3 B + 2 D + 2 M Solve for C given the following variable values: - PowerPoint PPT Presentation

Transcript of Concussion App

Page 1: Concussion App

Concussion AppObjectives:1. Explain how sequence, selection, and

iteration are building blocks of algorithms2. Create equations with two or more

variables to represent relationships among quantities.

Page 2: Concussion App

Warm-UpC = 3V + 3B + 2D + 2M

1. Solve for C given the following variable values:a) V = 7 B = 4 D = 8 M = 6b) V = 9 B = 8 D = 7 M = 4

2. Describe the relationship between variables V, B, D, & M.c) Do they all affect C equally?d) How does V affect C? e) How does V’s effect on C compare to B’s? f) How does V’s effect on C compare to M’s?

Page 3: Concussion App

Concussion FactorsWhat factors go into diagnosing a concussion?

http://www.youtube.com/watch?v=k1qvcw-zqtQ

Page 4: Concussion App

Concussion Symptoms• Vomiting/Nausea• Balance problems/clumsy• Drowsy/dazed• Memory loss before and after event

Page 5: Concussion App

Who should be able to play?Person 1

Vomit: SpitBalance: Slightly off-balanceDrowsy: active, wants to play, eyes slightly closedMemory: remembers everything, but slow response

Person 2

Vomit: NoneBalance: okDrowsy: tired, wants to restMemory: remembers before and hazy about after

Person 3

Vomit: ChunksBalance: needs to lean on chairDrowsy: Wants to close eyesMemory: Slow to respond

Page 6: Concussion App

Who should be able to play?Person 1

Vomit: SpitBalance: Slightly off-balanceDrowsy: active, wants to play, eyes slightly closedMemory: remembers everything, but slow response

Person 2

Vomit: NoneBalance: okDrowsy: tired, wants to restMemory: remembers before and hazy about after

Person 3

Vomit: ChunksBalance: needs to lean on chairDrowsy: Wants to close eyesMemory: Slow to respond

How do we compute a rating (0 to 100) for

each person?

Page 7: Concussion App

Who should be able to play?Person 1

Vomit: SpitBalance: Slightly off-balanceDrowsy: active, wants to play, eyes slightly closedMemory: remembers everything, but slow response

Person 2

Vomit: NoneBalance: okDrowsy: tired, wants to restMemory: remembers before and hazy about after

Person 3

Vomit: ChunksBalance: needs to lean on chairDrowsy: Wants to close eyesMemory: Slow to respond

We need numbers!

Page 8: Concussion App

Computing a Problem

1. Identify Factors: Variables

2. Quantify: Numbers & Units

3. Express the Relationship: Equation

4. Algorithm: How my mind does it

5. Coded Algorithm: How computer does it

Page 9: Concussion App

We need to Quantify!Person 1

Vomit: 2Balance: 6Drowsy: 5Memory: 6

Person 2

Vomit: NoneBalance: okDrowsy: tired, wants to restMemory: remembers before and hazy about after

Person 3

Vomit: ChunksBalance: needs to lean on chairDrowsy: Wants to close eyesMemory: Slow to respond

Rate the factors on a scale from 0-10.

0 = best 10 = worst

Page 10: Concussion App

We need to Quantify!Person 1

Vomit: 2Balance: 6Drowsy: 5Memory: 6

Person 2

Vomit: NoneBalance: okDrowsy: tired, wants to restMemory: remembers before and hazy about after

Person 3

Vomit: ChunksBalance: needs to lean on chairDrowsy: Wants to close eyesMemory: Slow to respond

But how do you rate vomit?

Page 11: Concussion App

SelectionIf vomit >= 300 Then vomit = 10ElseIf vomit >= 250 Then vomit = 9Etc…

Page 12: Concussion App

Who should be able to play?Person 1

Vomit: SpitBalance: Slightly off-balanceDrowsy: active, wants to play, eyes slightly closedMemory: remembers everything, but slow response

Person 2

Vomit: NoneBalance: okDrowsy: tired, wants to restMemory: remembers before and hazy about after

Person 3

Vomit: ChunksBalance: needs to lean on chairDrowsy: Wants to close eyesMemory: Slow to respond

Do all the factors have the same importance?

Page 13: Concussion App

Priority• Put the four factors in order from most to

least significant.Vomit, Balance, Drowsy, Memory1. _________________ (most important)2. _________________3. _________________4. _________________ (least important)

Page 14: Concussion App

Weighting the Priorities• You have a total of 10 weights to use. Allocate

the weights based on priority.

1. Memory x 3 2. Balance x 33. Vomit x 24. Drowsy x 2

Adds up to 10

____10

Page 15: Concussion App

Equation to Rate Concussion

Memory: ____

Balance: ____

Vomit: ____

Drowsy: ____

x ____ = ____

x ____ = ____

x ____ = ____

x ____ = ____

+

+

+

Rating: _________

0 to 10 Weight Total

Page 16: Concussion App

Sample Calculation

Memory: 9

Balance: 6

Vomit: 7

Drowsy: 5

x 2 = 18

x 2 = 12

x 4 = 28

x 2 = 10

+

+

+

Rating: 68

0 to 10 Weight Total

Page 17: Concussion App
Page 18: Concussion App

SequenceTextWindow.WriteLine(“How much vomit?")vomit = TextWindow.Read()

VS.

vomit = TextWindow.Read()TextWindow.WriteLine(“How much vomit?")

Page 19: Concussion App

SelectionIf repeat = "y" Then Goto StartEndIf Checks if the user

types in “y”

Page 20: Concussion App

IterationIf repeat = "y" Then Goto StartEndIf Checks if the user

types in “y”Goes back to beginning and

repeats program

‘top of program codeStart: GraphicsWindow.Draw...

Page 21: Concussion App

Exit Card1. Write down the equation you used to rate a

concussion.2. Write example sets of inputs for two athletes

and calculate the rating.3. Describe the relationship between the input

variables.a) How does each affect the rating? b) Compare one variable’s effect to another.