1/42
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Repetition structure
(or loop) Repeatedly processes instructions until condition is met
Looping condition
The requirement for repeating the instructions
Loop exit condition
The requirement for not repeating the instructions
Pretest loop
Evaluates condition prior to processing instructions
Posttest loop
Evaluates condition after processing instructions
Do...Loop statement
Used to code both pretest loop and posttest loop
Pretest, posttest
Two variations of syntax of do...loop: One for _______ loop and one for ________ loop
While keyword
Indicates that instructions should be processed while condition is true
Until keyword
Indicates that instructions should be processed until condition becomes true
Do...Loop statement
Begins with Do clause, ends with Loop clause Instructions to be repeated are placed between Do and Loop clauses
Condition
must evaluate to Boolean True or False
Do, loop
Location of { While | Until } condition
Pretest loop: Appears in __ clause
Posttest loop: Appears in ____ clause
Diamond
Represents loop condition in flowchart
Infinite loop
Also called endless loop. The condition to end the loop is never met
Stop debugging
To stop an infinite loop: Click Debug on the menu bar, then click ____ _________
Counters and Accumulators
Used to calculate subtotals, totals, and averages
Counter
Numeric variable used for counting
Accumulator
Numeric variable for accumulating (adding together) something
Initializing
Assigning beginning value
Updating
(incrementing) Adding a number to accumulator's value. Number can be positive or negative. Done within the loop body
Priming read
Use to prime (prepare or set up) loop by performing first action prior to entering loop
Update read
Allows user to update value that controls loop's condition
Arithmetic Assignment Operators
Used to abbreviate an assignment statement: Containing an arithmetic operator
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.
Looping range
Start value and end value provide _______ _____
Counter
Step value increments or decrements _______
Hexagon
For clause represented by a _______ in flowchart
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
Refresh method
method, Ensures that computer processes any previous lines of code that affect interface appearance
Sleep method
method, Delays program execution
List box
object. Displays list of choices from which user can select zero or more choices
SelectionMode property
Controls number of choices that can be selected
ListBox tool
Used to add list box to interface
3-8
List box can be made any size you want. Windows standard: _-_ choices
Collection
Group of objects treated as one unit
Items collection
Refers to group of items in list box
Index
Unique number that identifies each item in collection. First item has index of zero
Add
Items collection's ___ method: Used to add item to list box. Usually entered in form's Load event procedure
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
SelectedItem property
Contains value of selected item. Contains empty string when no item is selected
SelectedIndex property
Contains value of selected item's index . Contains -1 when no item is selected
Default list box item
Appears when application is first loaded. Chosen by setting either SelectedItem or SelectedIndex property
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