mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
15 lines
291 B
Python
15 lines
291 B
Python
from math import *
|
|
from fractions import Fraction
|
|
|
|
|
|
def factors(n):
|
|
result = set()
|
|
for i in range(1, int(sqrt(n)) + 1):
|
|
div, mod = divmod(n, i)
|
|
if mod == 0:
|
|
result.add(div)
|
|
result.add(mod)
|
|
return result
|
|
|
|
|
|
print("loaded Python calculator")
|