MATH 314 Quiz 01

  1. Please read all parts before beginning: write a class called CPU.
    1. The init function / constructor should accept an argument that sets some cpu type to the property named _cpu_type. The default value, if no value is supplied by the caller, should be 0x86.
    2. There should be a method named cpu_type which returns the type of the property _cpu_type, not just the property itself.
    3. Name two benefits of having the property _cpu_type named with a leading underscore and the method cpu_type named without a leading underscore.
  2. What is a reasonable guess for the most common word in Python?