from random import randrange

r = randrange(10,51)

if r % 2 ==0: print(r,"is even")
else: print(r,"is odd")

from random import randrange

for N in [100,1000,10000,100000]:
    first_half=second_half=0
    for i in range(N):
        r = randrange(100)
        if r<50: 
            first_half = first_half + 1
        else: 
            second_half=second_half + 1
    print(N,"->",first_half/N,second_half/N)