Python‎ > ‎random‎ > ‎

random.lognormvariate()

http://www.adilwaseem.com/

Introduction
The lognormvariate(mu, sigma) method of random.

Syntax
random.lognormvariate()->random

Parameters
mu=mean
sigma=standard deviation

Example
import random
x=random.lognormvariate(4,.1)
print(x)

>>> 
68.47067204624511
>>>

The return with the round value of a|b.
import operator
import random
a=round(random.lognormvariate(4,7))
b=round(random.normalvariate(19,3))
x=operator.or_(a,b)
print(x)

>>> 
48
>>

a|b
also equal to operator.or_(a,b):
a=round(random.lognormvariate(4,7))
b=round(random.normalvariate(19,3))
random1=a|b
print(random1)
>>>
48
>>>

Comments