study maze 5.05

93
STUDY MAZE 5.05 Looping Structures

Upload: oma

Post on 22-Feb-2016

30 views

Category:

Documents


0 download

DESCRIPTION

Study Maze 5.05. Looping Structures. Click On Your Character. The input box is a …?. A. B. dialog box that pops up and prompts the user for input. Text area that pops up and prompts the user for to wait while it gets input. The input box is a …?. A. B. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Study Maze  5.05

STUDY MAZE 5.05

Looping Structures

Page 2: Study Maze  5.05

Click On Your Character

Page 3: Study Maze  5.05
Page 4: Study Maze  5.05

The input box is a …?

A Bdialog box that

pops up and prompts the

user for input

Text area that pops up and prompts the user for to wait while it gets input

Page 5: Study Maze  5.05
Page 6: Study Maze  5.05

The input box is a …?

A Bdialog box that

pops up and prompts the

user for input

Text area that pops up and prompts the user for to wait while it gets input

Page 7: Study Maze  5.05
Page 8: Study Maze  5.05

What is the most common name for a counter variable?

A Bi x

Page 9: Study Maze  5.05
Page 10: Study Maze  5.05

What is the most common name for a counter variable?

A Bi x

Page 11: Study Maze  5.05
Page 12: Study Maze  5.05

Accumulator variable is useful for …?

A. B.Keeping the loop

runningKeeping a

running total

Page 13: Study Maze  5.05
Page 14: Study Maze  5.05

Accumulator variable is useful for …?

A. B.Keeping the loop

runningKeeping a

running total

Page 15: Study Maze  5.05
Page 16: Study Maze  5.05

The four types of loops are …?

A. B.Do WhileDo…Loop WhileFor…NextFor Each…Next

Do WhileDo…Loop WhileFor…NextDo For …Next

Page 17: Study Maze  5.05
Page 18: Study Maze  5.05

The four types of loops are …?

A. B.Do WhileDo…Loop WhileFor…NextFor Each…Next

Do WhileDo…Loop WhileFor…NextDo For …Next

Page 19: Study Maze  5.05
Page 20: Study Maze  5.05

A posttest is …?

A. B.Test the condition BEFORE the loop runs. If the condition is false the loop will not execute.

Run the loop one time then test the condition- if the condition is false the loop will then terminate

Page 21: Study Maze  5.05
Page 22: Study Maze  5.05

A posttest is …?

A. B.Test the condition BEFORE the loop runs. If the condition is false the loop will not execute.

Run the loop one time then test the condition- if the condition is false the loop will then terminate

Page 23: Study Maze  5.05
Page 24: Study Maze  5.05

Do While … Loop Syntax?

A. B.Do While conditionStatementsLoop

Do conditionStatementsLoop While

Page 25: Study Maze  5.05
Page 26: Study Maze  5.05

Do While … Loop Syntax?

A. B.Do While conditionStatementsLoop

Do conditionStatementsLoop While

Page 27: Study Maze  5.05
Page 28: Study Maze  5.05

When should you use a for next loop?

A. B.when you know how many times the loop will run

when a variable is used in the condition.

Page 29: Study Maze  5.05
Page 30: Study Maze  5.05

When should you use a for next loop?

A. B.when you know how many times the loop will run

when a variable is used in the condition.

Page 31: Study Maze  5.05
Page 32: Study Maze  5.05

Winner

Page 33: Study Maze  5.05
Page 34: Study Maze  5.05

The syntax for an input box is …?

A. B.StrVariable = InputBox (prompt, title) StrVariable = InputBox “prompt,

title”

Page 35: Study Maze  5.05
Page 36: Study Maze  5.05

The syntax for an input box is …?

A. B.StrVariable = InputBox (prompt, title) StrVariable = InputBox “prompt,

title”

Page 37: Study Maze  5.05
Page 38: Study Maze  5.05

What makes an accumulator variable different from a counter variable?

A. B. the value

that updates the

accumulator changes

It adds up all values

Page 39: Study Maze  5.05
Page 40: Study Maze  5.05

What makes an accumulator variable different from a counter variable?

A. B. the value

that updates the

accumulator changes

It adds up all values

Page 41: Study Maze  5.05
Page 42: Study Maze  5.05

Looping =?

A. B.Circles Repeated

actions

Page 43: Study Maze  5.05
Page 44: Study Maze  5.05

Looping =?

A. B.Circles Repeated

actions

Page 45: Study Maze  5.05
Page 46: Study Maze  5.05

What are two different ways to test a condition?

A. B.Pretest

and Prosttest

Pretestand

Protest

Page 47: Study Maze  5.05
Page 48: Study Maze  5.05

What are two different ways to test a condition?

A. B.Pretest

and Prosttest

Pretestand

Protest

Page 49: Study Maze  5.05
Page 50: Study Maze  5.05

A pretest loop only executes if the condition is for at least one time

A. B.False True

Page 51: Study Maze  5.05
Page 52: Study Maze  5.05

A pretest loop only executes if the condition is for at least one time

A. B.False True

Page 53: Study Maze  5.05
Page 54: Study Maze  5.05

Do … Loop While Syntax?

A. B.Do StatementsLoop While condition

Do StatementsLoop (condition)

Page 55: Study Maze  5.05
Page 56: Study Maze  5.05

Do … Loop While Syntax?

A. B.Do StatementsLoop While condition

Do StatementsLoop (condition)

Page 57: Study Maze  5.05
Page 58: Study Maze  5.05

When should you use a While Loop?

A. B.when a

variable is used in the condition

when you know how

many times the loop will

run

Page 59: Study Maze  5.05
Page 60: Study Maze  5.05

When should you use a While Loop?

A. B.when a

variable is used in the condition

when you know how

many times the loop will

run

Page 61: Study Maze  5.05
Page 62: Study Maze  5.05

Winner

Page 63: Study Maze  5.05
Page 64: Study Maze  5.05

When dealing with loops you also may use a to determine the number of times a loop executes.

A.

counter variable

B.

Accumulator Variable

Page 65: Study Maze  5.05
Page 66: Study Maze  5.05

When dealing with loops you also may use a to determine the number of times a loop executes.

A.

counter variable

B.

Accumulator Variable

Page 67: Study Maze  5.05
Page 68: Study Maze  5.05

Syntax for an accumulator variable is …?

A.accumulator = accumulator + valueaccumulator += value

B.accumulator = accumulator + variableaccumulator += variable

Page 69: Study Maze  5.05
Page 70: Study Maze  5.05

Syntax for an accumulator variable is …?

A.accumulator = accumulator + valueaccumulator += value

B.accumulator = accumulator + variableaccumulator += variable

Page 71: Study Maze  5.05
Page 72: Study Maze  5.05

An iteration is …?

A.Every time

the loop returns to

the top

B.Each time the loop runs

Page 73: Study Maze  5.05
Page 74: Study Maze  5.05

An iteration is …?

A.Every time

the loop returns to

the top

B.Each time the loop runs

Page 75: Study Maze  5.05
Page 76: Study Maze  5.05

A pretest is …?

A.Test the condition BEFORE the loop runs. If the condition is false the loop will not execute.

B.Run the loop

one time then test the condition- if

the condition is false the

loop will then terminate

Page 77: Study Maze  5.05
Page 78: Study Maze  5.05

A pretest is …?

A.Test the condition BEFORE the loop runs. If the condition is false the loop will not execute.

B.Run the loop

one time then test the condition- if

the condition is false the

loop will then terminate

Page 79: Study Maze  5.05
Page 80: Study Maze  5.05

A posttest loop will _____ execute at least one time.

A.NEVER

B.ALWAYS

Page 81: Study Maze  5.05
Page 82: Study Maze  5.05

A posttest loop will _____ execute at least one time.

A.NEVER

B.ALWAYS

Page 83: Study Maze  5.05
Page 84: Study Maze  5.05

For Next Loop Syntax

A.For counter = start To end

StatementsNext counter

B.For counter = start To end

Statementsloop

Page 85: Study Maze  5.05
Page 86: Study Maze  5.05

For Next Loop Syntax

A.For counter = start To end

StatementsNext counter

B.For counter = start To end

Statementsloop

Page 87: Study Maze  5.05
Page 88: Study Maze  5.05

A flag is …?

A.A condition

used to signify that a loop should

stop executing

B.A condition

used to signify that a loop should continue to

execute

Page 89: Study Maze  5.05
Page 90: Study Maze  5.05

A flag is …?

A.A condition

used to signify that a loop should

stop executing

B.A condition

used to signify that a loop should continue to

execute

Page 91: Study Maze  5.05
Page 92: Study Maze  5.05

Winner

Page 93: Study Maze  5.05