Questions
True or False, modules are code that you import into your program for added
functionality?
Give an example of using the
math
module.How can you import all of module's functions into your program so you don't
have to continually write
name_of_module.function()
?What does immutable mean?
What is the difference between a list and a tuple?
What is the difference between a list and a dictionary?
How could you get the second-to-last item in a list?
Do all of the items in lists or dictionaries have to be the same data type?
Based on the following list, how could you get another list from index 2 to
index 4?
How could you check to see if
4
exists in the list above?Using the code below, what is the value of right_answer?
Using the code below, what is the value of spam?
Suggest one way that you can avoid the problem of accidentally modifying a
list you didn't mean to.
Last updated