CHAPTER 6 - The Repetition Structure

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/42

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

43 Terms

1
New cards

Repetition structure

(or loop) Repeatedly processes instructions until condition is met

2
New cards

Looping condition

The requirement for repeating the instructions

3
New cards

Loop exit condition

The requirement for not repeating the instructions

4
New cards

Pretest loop

Evaluates condition prior to processing instructions

5
New cards

Posttest loop

Evaluates condition after processing instructions

6
New cards

Do...Loop statement

Used to code both pretest loop and posttest loop

7
New cards

Pretest, posttest

Two variations of syntax of do...loop: One for _______ loop and one for ________ loop

8
New cards

While keyword

Indicates that instructions should be processed while condition is true

9
New cards

Until keyword

Indicates that instructions should be processed until condition becomes true

10
New cards

Do...Loop statement

Begins with Do clause, ends with Loop clause Instructions to be repeated are placed between Do and Loop clauses

11
New cards

Condition

must evaluate to Boolean True or False

12
New cards

Do, loop

Location of { While | Until } condition

Pretest loop: Appears in __ clause

Posttest loop: Appears in ____ clause

13
New cards

Diamond

Represents loop condition in flowchart

14
New cards

Infinite loop

Also called endless loop. The condition to end the loop is never met

15
New cards

Stop debugging

To stop an infinite loop: Click Debug on the menu bar, then click ____ _________

16
New cards

Counters and Accumulators

Used to calculate subtotals, totals, and averages

17
New cards

Counter

Numeric variable used for counting

18
New cards

Accumulator

Numeric variable for accumulating (adding together) something

19
New cards

Initializing

Assigning beginning value

20
New cards

Updating

(incrementing) Adding a number to accumulator's value. Number can be positive or negative. Done within the loop body

21
New cards

Priming read

Use to prime (prepare or set up) loop by performing first action prior to entering loop

22
New cards

Update read

Allows user to update value that controls loop's condition

23
New cards

Arithmetic Assignment Operators

Used to abbreviate an assignment statement: Containing an arithmetic operator

24
New cards

For...Next statement

Used to code a counter-controlled loop. Processes instructions precise number of times. Condition tested before processing (pretest loop). Must specify start value, end value, and step value.

25
New cards

Looping range

Start value and end value provide _______ _____

26
New cards

Counter

Step value increments or decrements _______

27
New cards

Hexagon

For clause represented by a _______ in flowchart

28
New cards

Nested repetition structure

Inner loop placed entirely within outer loop. Inner loop is referred to as nested loop. Clocks use this structure to keep track of time

29
New cards

Refresh method

method, Ensures that computer processes any previous lines of code that affect interface appearance

30
New cards

Sleep method

method, Delays program execution

31
New cards

List box

object. Displays list of choices from which user can select zero or more choices

32
New cards

SelectionMode property

Controls number of choices that can be selected

33
New cards

ListBox tool

Used to add list box to interface

34
New cards

3-8

List box can be made any size you want. Windows standard: _-_ choices

35
New cards

Collection

Group of objects treated as one unit

36
New cards

Items collection

Refers to group of items in list box

37
New cards

Index

Unique number that identifies each item in collection. First item has index of zero

38
New cards

Add

Items collection's ___ method: Used to add item to list box. Usually entered in form's Load event procedure

39
New cards

Sorted property

______ ________ of list box: Determines order of displayed items. If True, newly added item is placed in its proper position. If False, newly added item is placed at end of list. Uses dictionary sort order

40
New cards

SelectedItem property

Contains value of selected item. Contains empty string when no item is selected

41
New cards

SelectedIndex property

Contains value of selected item's index . Contains -1 when no item is selected

42
New cards

Default list box item

Appears when application is first loaded. Chosen by setting either SelectedItem or SelectedIndex property

43
New cards

SelectedValueChanged event, SelectedIndexChanged event

Occur when user or code statement selects item in list box. Can use these events to process instructions when selection is made