mirror of
https://github.com/Fare-spec/cours.git
synced 2025-12-08 03:00:37 +00:00
Add university content
This commit is contained in:
14
high-school/perfect_number/main.py
Normal file
14
high-school/perfect_number/main.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import math
|
||||
|
||||
|
||||
def find_diviseur(number):
|
||||
diviseurs = []
|
||||
limit = int(number / 2)
|
||||
for i in range(1, limit):
|
||||
if number % i == 0:
|
||||
diviseurs.append(i)
|
||||
return diviseurs
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(find_diviseur(15))
|
||||
Reference in New Issue
Block a user