odd.total and prime number order
This commit is contained in:
parent
3cfced96f6
commit
104be53ebe
8
odd.total.py
Normal file
8
odd.total.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
n = int(input('Bir sayı giriniz:'))
|
||||||
|
|
||||||
|
total = 0
|
||||||
|
for i in range(1, n + 1, 2):
|
||||||
|
total += i
|
||||||
|
print(total)
|
||||||
|
|
||||||
|
|
8
prime.number.order.py
Normal file
8
prime.number.order.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
n = int(input('Bir sayı giriniz:'))
|
||||||
|
div = 2
|
||||||
|
while n != 1:
|
||||||
|
if n % div == 0:
|
||||||
|
n //= div
|
||||||
|
print(div, end=' ')
|
||||||
|
else:
|
||||||
|
div += 1
|
Loading…
Reference in New Issue
Block a user