Questions
What is the difference between a while loop and a for loop?
How do you write a while loop?
How do you write a for loop?
What is a code block?
What is an infinite loop?
Is it possible to have an infinite for loop?
How do you exit an infinite loop if you're in one?
What does the
range()
function do?Give a reason for why you might use the
break
orcontinue
commands.True or False, the
pass
command will skip everything until the end of theif
statement below?
Give an example of a 3-dimensional list.
True or False, the items in a list maintain the order of when they were added?
True or False, the items in a dictionary maintain the order of when they were added?
What does the enumerate function do?
Try printing out
range(10)
to see that iterating with numbers is really justcreating a list to iterate over.
Last updated