Skip to content

Module 2 Graded Quiz: Python Data Structures :Python for Data Science, AI & Development (Applied Data Science Specialization) Answers 2025

1. Access test group measurements

  • experiment_data[1] ✅

  • experiment_data[0] ❌

  • experiment_data[0:1] ❌

  • experiment_data[1][0] ❌


2. Difference between simple vs nested tuple access

  • Nested tuple structures require multiple indices to access inner elements. ✅

  • Accessing nested tuples always returns another tuple ❌

  • Simple → positive, nested → negative ❌

  • Square brackets vs parentheses ❌


3. Result of cart.append([‘hat’,’belt’])

  • [‘shirt’, ‘pants’, [‘hat’, ‘belt’]] ✅

  • [‘shirt’,’pants’,’hat’,’belt’] ❌

  • [‘hat’,’belt’,’shirt’,’pants’] ❌

  • [[‘hat’,’belt’], ‘shirt’,’pants’] ❌


4. del statement effect

  • Copy of list ❌

  • Only first/last ❌

  • Permanently modifies original list by removing elements ✅

  • Returns removed element ❌


5. Why proper list copies matter

  • Uses less memory ❌

  • Changes to copied list won’t affect original; assignment will. ✅

  • Only needed for numeric data ❌

  • Direct assignment deprecated ❌


6. (“Python”,”Data”,”Science”)[1:3]

  • (“Python”,”Science”) ❌

  • [“Python”,”Data”] ❌

  • (“Data”,”Science”) ✅

  • [“Data”,”Science”] ❌


7. Dictionary values

  • “The Bodyguard” & “Saturday Night Fever” ❌

  • “1992” & “Saturday Night Fever” ❌

  • “The Bodyguard” & “1977” ❌

  • “1977” and “1992” ✅


8. Add/update dictionary entry

  • Use square bracket notation with key to assign/update value. ✅

  • insert() ❌

  • Immutable ❌

  • add() ❌


9. V.add(‘C’) result

  • {‘A’,’B’} ❌

  • Error ❌

  • {‘AC’,’BC’} ❌

  • {‘A’,’B’,’C’} ✅


10. Check if ‘B456’ is authorized

  • auth_codes == ‘B456’ ❌

  • auth_codes.contains() ❌

  • auth_codes.find() ❌

  • ‘B456’ in auth_codes ✅