get started with python coursera week 4 quiz answers Test your knowledge: Lists and tuples 1. Lists and their contents are immutable, so their elements cannot be modified, added, or removed. Answers TrueFalse 2. What Python method adds an element to the end of a list? Answers append()type()pop()remove() 3. A data professional wants to instantiate a tuple. What Python elements can they use to do so? Select all that apply. Answers The tuple() function ParenthesesThe insert() functionSquare brackets 4. What Python technique formulaically creates a new list based on the values in an existing list? Answers List comprehensionList conversionList sequencingList nesting Test your knowledge: Dictionaries and sets 5. Fill in the blank: In Python, a dictionary’s _____ must be immutable. Answers setslistskeysorder 6. In Python, what does the items() method retrieve? Answers Both a dictionary’s keys and valuesOnly a dictionary’s keysA dictionary’s setsOnly a dictionary’s values 7. A data professional is working with two Python sets. What function can they use to find all the elements from both sets? Answers intersection()difference()symmetric_difference()union() Test your knowledge: Arrays and vectors with NumPy 8. Python libraries and packages include which of the following features? Select all that apply. Answers DocumentationReusable collections of codeCellsModules Shuffle Q/A 1 9. What is the core data structure of NumPy? Answers DictionaryGlobal variableArrayList 10. A data professional wants to confirm the number of dimensions of an array. What NumPy attribute can they use to do so? Answers shapendimdimensiondtype Next Share the love Share this content Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window You Might Also Like Week 3 – Packages, APIs, Datasets and Models Week 5 – Logistic regression – Shuffle Q/A 1 Week 2 – Dynamic database design Leave a Reply Cancel replyCommentEnter your name or username to comment Enter your email address to comment Enter your website URL (optional) Save my name, email, and website in this browser for the next time I comment.