simulation and design python provides library module that contains number of useful functions for generating pseudo random numbers the functions in this module derive an initial seed value from the date and time when the module is loadedso you get different seed value each time the program is run this means that you will also get unique sequence of pseudo random values the two functions of greatest interest to us are randrange and random the randrange function is used to select pseudo random int from given range it can be used with onetwoor three parameters to specify range exactly as with the range function for examplerandrange( , returns some number from the range [ , , , , ]and randrange( , , returns multiple of between and inclusive (rememberranges go up tobut do not includethe stopping value each call to randrange generates new pseudo random int here is an interactive session that shows randrange in actionfrom random import randrange randrange( , randrange( , randrange( , randrange( , randrange( , randrange( , randrange( , randrange( , randrange( , notice it took nine calls to randrange to eventually generate every number in the range - the value came up almost half of the time this shows the probabilistic nature of random numbers over the long haulthis function produces uniform distributionwhich means that all values will appear an (approximatelyequal number of times the random function can be used to generate pseudo random floating point values it takes no parameters and returns values uniformly distributed between and (including but excluding here are some interactive examplesfrom random import random random(