Y9

5j: Use iteration (for loops) to iterate over lists and strings

Keywords:
Python
Test your self on these keywords and definitions using the games below or Play random game
KeywordDefinition
characteran individual letter, digit or punctuation mark
data structurea special type of variable which can store more than one value
for loopa type of iteration where a block of code is repeated for each item in a data structure such as a list or string
indentationmoving a block of code over from the left of the code editor so that you know which lines of code should be repeated in a for loop
iterationrepeating a block of code multiple times
lena built in python function which can find the length of a list or string by counting the values or characters stored inside
lista data structure which stores multiple values in a specific order (e.g. different colours of the rainbow)
stringa data structure which stores multiple characters in a specific order (e.g. a sentence)
variablea named location in memory which can store a value. The name doesn't change but the value stored might change when the program runs.
Keyword games:
Resources: