27 lines
523 B
Python
27 lines
523 B
Python
import random
|
|
|
|
from faker import Faker
|
|
|
|
from synthesis.random import rnd
|
|
|
|
|
|
def generate_random_words(n_min, n_max):
|
|
words = " ".join(Faker().words(rnd.randint(n_min, n_max)))
|
|
return words
|
|
|
|
|
|
def generate_random_number():
|
|
return str(
|
|
round(
|
|
random.choice(
|
|
[
|
|
random.randint(-10000, 10000),
|
|
random.uniform(-100, 100),
|
|
]
|
|
),
|
|
random.choice(
|
|
[0, 1, 2, 3],
|
|
),
|
|
)
|
|
)
|