I tried to create a square root function:
def root(n, ind):
if ind == None:
ind = 2
ind2 = 1 / ind
print(n ** ind2)
I want ind
not to be mandatory.
I thought that if I did not put it, the value would become None
(so I put if ind == none, ind = 2
, so I can turn ind
into 2).
Is there any way, or is it impossible? Not even in a different way without being def
.