Print All Integers That Aren’t Divisible By Either 2 Or 3 And Lie Between 1 And 50 In Python.

In this Basic Python Program, we will have a look at how to “print all integers that are not divisible by either 2 or 3” with the help of Python Programming Language.

Python Program  To Print All Integers That Aren’t Divisible By Either 2 Or 3 And Lie Between 1 And 50  

for i in range(0,51):

    if(i%2!=0&i%3!=0):

        print(i)

In the above program, we print all integers that aren’t divisible by either 2 or 3 and lies between 1 and 50.

Leave a Reply

Your email address will not be published. Required fields are marked *

Shopping cart