Python - Methods and Behavior Definition
Find the error in this code that tries to update an object's attribute:
class Car:
def __init__(self):
self.speed = 0
def accelerate(self):
speed += 10
c = Car()
c.accelerate()
print(c.speed)