Last active
November 23, 2021 11:21
-
-
Save SuperLeo23/a18f1e64e22c346b44cee06708073002 to your computer and use it in GitHub Desktop.
Calculate divisors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while True: | |
num = float(input("Number: ")) | |
def is_div(number): | |
return(number).is_integer() | |
for i in range(1, int(num)): | |
result = is_div(num / i) | |
if result == True: | |
print(int(num / i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just trying some stuff