For Loops & Arrays
Terms in this set (25)
makes use of a counting variable.
The first part of the for loop
tells the computer to start with a value
second part of the for loop
determines ending the for loop.
Third part of the loop
controls how the loop counts up or down
i = i + 1
means we increment (increase) the variable i by 1 each time.
A more efficient way to code to increment up by 1
decrement down by 1 by writing
i += x
increment up by any value by writing, where x is how much we want to increment up by
i -= x.
decrement down by any value
a loop that can't properly end
can store numbers or strings.
store lists of data
Can store different data types at the same time
Are ordered so the position of each piece of data is fixed
surrounded by [ ]
a list of data into an array.
The position of things in arrays is fixed.
Starts counting the positions in an array from 0.
between each element in the array.
between each bit of the for loop.
backslash (\) at the end of each line
makes your string "wrap" to the next line
adds the thing between parentheses to the end of the array.
An object that enables a programmer to traverse a container, particularly lists.
YOU MIGHT ALSO LIKE...
AP Computer Science Unit 3 Terms
Python: Unit 1-9
CS 214 Final Notecards (Vocabulary)
OTHER SETS BY THIS CREATOR
Check Writing Definitions
Parts of a Check
Introduction To Computers -- Intel: The Journey Inside
Chapter 10 -- Money & Relationships
THIS SET IS OFTEN IN FOLDERS WITH...
AP CS Quiz 3/25(Inheritance and Polymorphism)