blob: 1f1930c6b1887ff545c3a2888782c8cf5e1f4fdf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
class Drink:
def mix(self, fluid_one, fluid_two):
return fluid_one + fluid_two
class Cocktail(Drink):
def mix(self, fluid_one, fluid_two, alcoholic_fluid_one="Beer"):
return fluid_one + fluid_two + alcoholic_fluid_one
class Car:
tank = 0
def fill_tank(self, gas):
self.tank += gas
class Airplane:
tank = 0
kerosene_tank = 0
def fill_tank(self, gas, kerosene):
self.tank += gas
self.kerosene_tank += kerosene
|