3
I was trying to create a square root function:
def root(n, ind):
if ind == None:
ind = 2
ind2 = 1 / ind
print(n ** ind2)
I want the ind not be mandatory.
I thought if I didn’t, the value would turn None (so I put if ind == none, ind = 2, in order to transform the ind in 2).
Is there any way, or is it impossible? Even with another way than def.