food.fruit package

Submodules

food.fruit.apple module

class food.fruit.apple.Apple(name='Apple', color='red')

Bases: BaseFruit

A class representing an apple fruit.

make_pie(size='medium')

Make an apple pie of a given size.

Parameters:

size (str) – The size of the pie. Default is “medium”.

class food.fruit.apple.Fuji(name='Fuji Apple', color='red')

Bases: Apple

A class representing a Fuji apple variety.

make_cider(size='large')

Make Fuji apple cider of a given size.

Parameters:

size (str) – The size of the cider. Default is “large”.

food.fruit.banana module

class food.fruit.banana.Banana(name='Banana', color='yellow')

Bases: BaseFruit

A class representing a banana fruit.

make_smoothie(size='medium')

Make a banana smoothie of a given size.

Parameters:

size (str) – The size of the smoothie. Default is “medium”.

food.fruit.base_fruit module

class food.fruit.base_fruit.BaseFruit(name, color)

Bases: object

A base class for fruits.

Parameters:
  • name (str) – The name of the fruit.

  • color (str) – The color of the fruit.

describe()

Return a description of the fruit.

Returns:

A description of the fruit.

Return type:

str

Module contents