Header Ads

Responsive Ads Here

Prime Numbers

Prime Numbers

for num in range(1,10):
    if num == 1:
        continue
    elif all(num % i != 0 for i in range(2, num)):
        print(num) 

Answer

2

3

5

7

YouTube Link:

https://youtu.be/EosIKTReXpQ

Powered by Blogger.