aboutsummaryrefslogtreecommitdiff
path: root/challenge-105/colin-crain/python/ch-1.py
blob: 5354ab0f920bdb854ad8a6e3228287cda0d59e34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python3
#
#
#       nth-root.py
#
#
#
#       © 2021 colin crain
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##

import math

def nroot( n, x ):
    return math.exp( math.log(x) / n )

m = 3
y = 125

print( nroot(m, y) )