Return to home page

Python Quiz: Module 7

Separation of Concerns


  1. Which function definition below produces an instance of a Dog encapsulating breed and color of the dog?

  2. What does a class constructor do?

  3. How can class attributes be accessed?

  4. From which base class do all new classes inherit from?

  5. You are designing a medical application. You have developed a class Person that contains data about an individual, like Name, Address, Phone, Insurance. You are now tasked with developing a class name Medication that inherits from Person that will include attributes about the medications that the person is using. Which of the following code could be used to define the Medication class?

  6. Which if the following is a decoration that run code to validate and assign data to a class attribute?

  7. Which of the following describes "overriding" in Python?

  8. Which of the following are true about Git and GitHub

  9. Which of the following is true about a Python statement?

  10. What is the purpose of creating multiple different classes instead of one big class that contains all the code in the different classes?

  11. "Separation of Concerns" is a design principal which dictates that code should be separated into distinct sections based on the functionality it provides.