prime number
This commit is contained in:
parent
6f601effc5
commit
caccd27cd3
11
prime.number.from.int.py
Normal file
11
prime.number.from.int.py
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
n = int(input('Bir sayı giriniz:'))
|
||||||
|
|
||||||
|
for i in range(2, n):
|
||||||
|
if n % i == 0:
|
||||||
|
print('Asal değil')
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
if n < 2:
|
||||||
|
print('Gecersiz sayı!')
|
||||||
|
else:
|
||||||
|
print('Asal')
|
Loading…
Reference in New Issue
Block a user