OOP 3: Initializing

OOP 3: Initializing

3.1.在Car 类中添加__init__() 函数,该函数接收brandmodel 参数,并将它们赋值给相应的对象属性。

3.2.您已经有了一个对象my_car ,它是在没有传递额外参数的情况下创建的。因此,为了避免在以这种方式创建对象时出错,让我们为__init__() 函数的参数添加一个默认值,它们的值为空字符串""

3.3.Car some_car1...

You should be an authorized user in order to see the full description and start solving this mission.