Presentation is loading. Please wait.

Presentation is loading. Please wait.

Looping Structures. 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.

Similar presentations


Presentation on theme: "Looping Structures. 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."— Presentation transcript:

1 Looping Structures

2

3

4 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

5

6 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

7

8 A B ix

9

10 A B ix

11

12 A. B. Keeping the loop running Keeping a running total

13

14 A. B. Keeping the loop running Keeping a running total

15

16 A. B. Do While Do…Loop While For…Next For Each…Next Do While Do…Loop While For…Next Do For …Next

17

18 A. B. Do While Do…Loop While For…Next For Each…Next Do While Do…Loop While For…Next Do For …Next

19

20 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

21

22 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

23

24 A. B. Do While condition Statements Loop Do condition Statements Loop While

25

26 A. B. Do While condition Statements Loop Do condition Statements Loop While

27

28 A. B. when you know how many times the loop will run when a variable is used in the condition.

29

30 A. B. when you know how many times the loop will run when a variable is used in the condition.

31

32

33

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

35

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

37

38 A. B. the value that updates the accumulator changes It adds up all values

39

40 A. B. the value that updates the accumulator changes It adds up all values

41

42 A. B. CirclesRepeated actions

43

44 A. B. CirclesRepeated actions

45

46 A. B. Pretest and Prosttest Pretest and Protest

47

48 A. B. Pretest and Prosttest Pretest and Protest

49

50 A. B. FalseTrue

51

52 A. B. FalseTrue

53

54 A. B. Do Statements Loop While condition Do Statements Loop (condition)

55

56 A. B. Do Statements Loop While condition Do Statements Loop (condition)

57

58 A. B. when a variable is used in the condition when you know how many times the loop will run

59

60 A. B. when a variable is used in the condition when you know how many times the loop will run

61

62

63

64 A. counter variable B. Accumulator Variable

65

66 A. counter variable B. Accumulator Variable

67

68 A. accumulator = accumulator + value accumulator += value B. accumulator = accumulator + variable accumulator += variable

69

70 A. accumulator = accumulator + value accumulator += value B. accumulator = accumulator + variable accumulator += variable

71

72 A. Every time the loop returns to the top B. Each time the loop runs

73

74 A. Every time the loop returns to the top B. Each time the loop runs

75

76 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

77

78 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

79

80 A. NEVER B. ALWAYS

81

82 A. NEVER B. ALWAYS

83

84 A. For counter = start To end Statements Next counter B. For counter = start To end Statements loop

85

86 A. For counter = start To end Statements Next counter B. For counter = start To end Statements loop

87

88 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

89

90 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

91

92

93


Download ppt "Looping Structures. 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."

Similar presentations


Ads by Google