Created
April 28, 2020 05:42
-
-
Save computer-tutor/037e5211f95aa255262d6158400b9b10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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