Passed
Push — master ( 22acc6...f41365 )
by Amresh
02:01
created

random_integers()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nop 2
1
import random
2
3
4
def random_integers(lower_limit=0, upper_limit=100):
5
    return random.randint(lower_limit, upper_limit)
6
7
8
def random_ascii_chars(max_char_len=1000):
9
    char_len = random_integers(lower_limit=0, upper_limit=max_char_len)
10
    return ''.join([chr(random_integers(0, 128)) for n in range(char_len)])
11
12
13
def random_float(lower_limit=0, upper_limit=100):
14
    return (random.random() * (upper_limit - lower_limit)) + lower_limit
15