reasoning under uncertainty representing probabilistic models variable consists of namea domain and an optional ( ,yposition (for displayingthe domain of variable is list or tupleas the ordering will matter in the representation of factors probvariables py -probabilistic variables import random class variable(object)""" random variable name (stringname of the variable domain (lista list of the values for the variable variables are ordered according to their name "" def __init__(selfnamedomainposition=none)"""variable name string domain list of printable values position of form ( , ""self name name string self domain domain list of values self position position if position else (random random()random random()self size len(domain def __str__(self)return self name