• 2022-06-09 问题

    ‎下列程序的输出结果是( )。​‎class Fruit():​‎ def __init__(self):​‎ print('Fruit')​‎ def grow(self):​‎ print('Fruit grow')​‎​‎class Vegetable():​‎ def __init__(self):​‎ print('Vegetable')​‎ def grow(self):​‎ print('Vegetable grow')​‎ ​‎class Tomato(Fruit,Vegetable):​‎ pass​‎​‎t = Tomato()​‎t.grow()​‎​‎知识点:多继承​ A: FruitFruit grow B: FruitVegetable grow C: VegetableFruit grow D: VegetableVegetable grow

    ‎下列程序的输出结果是( )。​‎class Fruit():​‎ def __init__(self):​‎ print('Fruit')​‎ def grow(self):​‎ print('Fruit grow')​‎​‎class Vegetable():​‎ def __init__(self):​‎ print('Vegetable')​‎ def grow(self):​‎ print('Vegetable grow')​‎ ​‎class Tomato(Fruit,Vegetable):​‎ pass​‎​‎t = Tomato()​‎t.grow()​‎​‎知识点:多继承​ A: FruitFruit grow B: FruitVegetable grow C: VegetableFruit grow D: VegetableVegetable grow

  • 1