Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def nthroot(x,n=2):
return round(x**(1/n),2)
print("Nth root of",10, 'for n=3 is',nthroot(10,3))
print("Square root of",30,"is", nthroot(30))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment