import random random.random() # Gives you a number BETWEEN 0 and 1 as a float round(random.random()) # Gives you a number EITHER 0 and 1