Posts by Murilouco • 33 points
1 post
-
3
votes1
answer2858
viewsQ: Optional parameter in function
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…