Python Refresher

Python in a Weekend - Classes

Create a class named Car and create an instance of it.

Solution

                    class Car:
  pass

my_whip = Car()
my_whip.speed = 220
print(my_whip.speed)
                

Here's some courses you might like: