odd.total and prime number order

This commit is contained in:
Mert Gör 🇹🇷 2023-05-20 18:51:31 +03:00
parent 3cfced96f6
commit 104be53ebe
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
2 changed files with 16 additions and 0 deletions

8
odd.total.py Normal file
View 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
View 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