diff --git a/samila/functions.py b/samila/functions.py index 501e402..c779c9b 100644 --- a/samila/functions.py +++ b/samila/functions.py @@ -11,20 +11,22 @@ from .params import FIG_SAVE_SUCCESS_MESSAGE, NFT_STORAGE_SUCCESS_MESSAGE, DATA_ from .params import ELEMENTS_LIST, ARGUMENTS_LIST, OPERATORS_LIST from .errors import samilaDataError + def random_equation_gen(): """ Generate random equation. :return: equation as str """ - num_elements = random.randint(2,len(ELEMENTS_LIST) + 3) + num_elements = random.randint(2, len(ELEMENTS_LIST) + 3) result = "" index = 1 random_coef = "random.uniform(-1,1)" - while(index<=num_elements): + while(index <= num_elements): argument = random.choice(ARGUMENTS_LIST) - result = result + random.choice(ELEMENTS_LIST).format(random_coef,argument) - if index