import random N2C="n" N3C="n" N4C="n" N5C="n" N6C="n" N1=random.randint(1,40) while N2C=="n": N2=random.randint(1,40) if N2 != N1: N2C="y" while N3C=="n": N3=random.randint(1,40) if N3 != N1: if N3 != N2: N3C="y" while N4C=="n": N4=random.randint(1,40) if N4 != N1: if N4 != N2: if N4 != N3: N4C="y" while N5C=="n": N5=random.randint(1,40) if N5 != N1: if N5 != N2: if N5 != N3: if N5 != N4: N5C="y" while N6C=="n": N6=random.randint(1,40) if N6 != N1: if N6 != N2: if N6 != N3: if N6 != N4: if N6 != N5: N6C="y" print("Lottery Numbers:", N1, N2, N3, N4, N5, N6)