prime number
This commit is contained in:
parent
6f601effc5
commit
caccd27cd3
1 changed files with 11 additions and 0 deletions
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 a new issue