IT 117: Intermediate Scripting
Answers to Class 17 Ungraded Quiz


  1. To create a new kind of object, what must you define?
    a class
  2. What do you call the special method that is used to create an object?
    constructor
  3. In Python what must the special method used to create an object be named?
    __init__
  4. What do you call an object that is created from a class?
    an instance
  5. Every method in a class must take a certain parameter. What is this parameter?
    self
  6. What two kinds of things do you define inside a class?
    variables and methods
  7. What do you call the style of programming that uses objects?
    Object Oriented Programming
  8. If I were writing a method in a class and wanted to set the value of the variable inside the class named count to zero, what Python statement would I write?
    self.count = 0
  9. If I had a variable named loan_1 that pointed to an object which contained the variable principle and I wanted to set the value of this variable to 1000, what Python statement would I write?
    loan_1.principle = 1000
  10. Do constructors have a return statement?
    no