Unit 7 Flashcards
Loops (cont.)
1
Q
7.3 - Nested Loops
What is a nested loop?
A
A loop within a loop
2
Q
7.3 - Nested Loops
What does ord()
and chr()
do?
A
ord()
- character to integerchr()
- integer to character
3
Q
7.4 - Developing Programs Incrimentally
What is a FIXME comment?
A
a comment indicating code that needs to be fixed in the future
4
Q
7.5 - enumerate()
; Index & Value When Looping
What does enumerate()
do?
A
retrieves the index & element value; acts as a tuple
5
Q
7.5 - enumerate()
; Index & Value When Looping
What is unpacking?
A
performing multiple assignments at once
ex. num1, num2 = [350, 400]