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

Share on facebook
Share on twitter
Share on pinterest

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.

Subscribe to our Newsletter

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Share this post with your friends

Share on facebook
Share on google
Share on twitter
Share on linkedin

Leave a Reply

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