Default car uses class attribute
Input
Car().is_using_class_attr()
Output
True
No instance attribute was set, so wheels comes from the class.
Full lesson preview
Understand the difference between attributes defined on the class vs. the instance.
Problem statement
Task
Examples
Input
Car().is_using_class_attr()
Output
True
No instance attribute was set, so wheels comes from the class.
Input format
Output format
Constraints
Samples
Input
Car(4).is_using_class_attr()
Output
False
Passing 4 to the constructor creates an instance attribute, so the instance is not using the class attribute even though values match.