CMP 104 Chapter 4
The _____ at the end of a for statement tells Python to interpret the next line as the start of a loop.
Colon
You cannot ever modify or assign a new value to a variable that holds a tuple.
False
When the syntax is valid Python code, but the code does not produce the desired result, it is called a _______. Selected Answ
Logical error
A tuple looks just like a list except you use ______ instead of square brackets.
Parenthesis
The ______ function causes Python to start counting at the first value you give it, and it stops when it reaches the second value.
Range ()
A list comprehension combines the for loop and the creation of new elements into one line, and automatically appends each new element.
True
Always indent the line after the for statement in a loop.
True
Python refers to values that cannot change as immutable, and an immutable list is called a ____.
Tuple
When you want to do the same action with every item in a list, you can use Python's ____loop.
for
You can loop all over the values in a tuple using a _____ loop, just as you did with a list.
for