Lesson About Loops
blog about the hacks
Vocabulary
- Iteration- a way that code goes through a segment
- While loop - a way that code goes through elemetnts over and over again
- For loops a to repeat something and its executed after its completed the repetition
- Booleans- a way to recongnize true/false.
- Pop; a way to take away something at the end of the list.
- Initialization - What sets the counter variable to a starting value.
- Condition - Allows the computer to know whether or not to keep repeating the loop.
- increment/decrement - Modifies the counter variable after each repetition.
- Indexing / List Index - The position of an element in a list, starting from 0
- Append/Remove/Pop : Various methods, append adds an element to the end, remove removes at an index, and pop removes the last item.
- Elements - An item in a list.
- Having one data type or function inside another data type or function, such as lists or loops.
- array - Another name for a list, depends on the language
Notes
- Lists have elements which can be mutated
- In addition python and java lists can mutate
- pop just means remove last at the item
- if you check libraries its a way to find your ways to reverse pop and change elements iin your list
-
- On this quiz I got 8/10 as I missed # 7/8
- #7 I initially answered mutation however the mutation changes the list and its doesent show what base 0 shows therefore it is wrong
- #8 originally I said C that it itteriates through but that is wrong as that isnt the function of the loop