Question OOP-CLS-0010
MediumWhat is the output of this code?
class Car:
def __init__(self, speed):
self.speed = speed
a = Car(10)
b = Car(20)
print(a.speed, b.speed)
- A.
20 20
- B.
10 20
- C.
Sign up free to see the answer and a step-by-step explanation.