Randomness is added to programs by using random numbers. These are generated by random number functions.
Python has a package called random. Two of the functions it provides are: