Learn practical skills, build real-world projects, and advance your career
Created 5 years ago
#to list all prime no between range
for num in range(2,10):
if (num>=1):
for i in range(2,num):
if (num%i==0):
break
else:
print(num)
#to check whether it is prime no or not
num= input("Enter the number between 2 and 100:")
print(type(num))
if (int(num)>1):
for i in range (2,100):
if (int(num)%i)==0:
print("not a prime number")
break
else:
print(" a prime number")
!pip install jovian -q
import jovian
jovian.commit()