MATH 314 Quiz 01
2025-01-28. No notes, no electronic devices.
- Please read all parts before beginning: write a class called
CPU
. - 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 be0x86
. - There should be a method named
cpu_type
which returns the type of the property_cpu_type
, not just the property itself. - Name two benefits of having the property
_cpu_type
named with a leading underscore and the methodcpu_type
named without a leading underscore. - What is a reasonable guess for the most common word in Python?