Vocab 2-19 Flashcards
(9 cards)
Loop
A loop is a way to repeat code in your program.
For Loop
A for loop lets us repeat code a fixed number of times.
Control Structure
A control structure lets us change the flow of the code.
Condition
A condition is code that you put inside an if statement or while-loop
If statement
An if statement lets you ask a question to the program and only run code if the answer is true.
If else statement
Control structure that lets us do either one section of code or another depending on a test.
Loop
A loop is a way to repeat code in your program.
While loop
Lets us repeat code as long as something is true.
Fencepost Problem
A problem when using a while loop where you forget one action at the beginning or the end.