import random testa = 0 croce = 0 i = 0 while (i<1000): n = random.randint(0,100) if (n<50): testa = testa+1 else: croce = croce+1 i = i+1 print "Teste:",testa," Croci:",croce