Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def func(num):
- x = range(2,num-1)
- count = 0
- if num>1:
- for sayi in x:
- if num % sayi == 0:
- count +=1
- if count >= 1:
- print("not prime")
- else:
- print("prime")
- num = int(input("Enter a number: "))
- func(num)
Add Comment
Please, Sign In to add comment