class car:

def **init**(self,model,color):

self.model = model

self.color = color

self.speed = 0

def acceleration(self,accelerate):

self.speed += accelerate

maruti = car(“maturi_model”, “blue”)

maruti.acceleration(20)

print(maruti.speed)

class car:

def **init**(self,model,color):

self.model = model

self.color = color

self.speed = 0

def acceleration(self,accelerate):

self.speed += accelerate

maruti = car(“maturi_model”, “blue”)

maruti.acceleration(20)

print(maruti.speed)

1 Like

what’s the question?

@praveenkumar01092001 i think this is correct code try running it again

class Car:

def **init**(self, model, color):

self.model = model

self.color = color

self.speed = 0

```
def acceleration(self, accelerate):
self.speed += accelerate
```

maruti = Car(“maruti_model”, “blue”)

maruti.acceleration(20)

print(maruti.speed)