Welcome to Assig1’s documentation!

Just reading Plato’s Republic!

Indices and tables

I used as example ‘The Republic’ written by Plato. To retrieve a list of random ingredients, you can use the lumache.get_random_ingredients() function:

lumache.get_random_ingredients(kind=None)

Return a list of random ingredients as strings.

Parameters

kind (list[str] or None) – Optional “kind” of ingredients.

Returns

The ingredients list.

Return type

list[str]

The kind parameter should be either "meat", "fish", or "veggies". Otherwise, lumache.get_random_ingredients() will raise an exception.

exception lumache.InvalidKindError

Raised if the kind is invalid.

>>> import lumache
>>> lumache.get_random_ingredients()
['shells', 'gorgonzola', 'parsley']
>>> def get_random_ingredients(kind=None):
>>> return ["shells", "gorgonzola", "parsley"]

you can use the frequency_alphabet(filename,*args) function: