Creating a Car Class (Challenge)
Here comes your first challenge: create a
Car class. And this challenge is relatively similar to creating the
Dog class before, but the idea here is really that you need to train these concepts. To actually train them, practically write classes and think about how to create them.
Your challenge task here is to create a
Car class with two instance attributes. The first one’s going to be
.color, and that should store the name of the car’s color as a string, and then also
.mileage, which stores the number of miles on the car as an integer.
Become a Member to join the conversation.