-
-
Save amankharwal/d8bff02156ad3f6373e85b4351e6694f 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 factorial(n) -> object: | |
return 1 if (n==1 or n==0) else n * factorial(n-1) | |
n= int(input("enter number")) | |
print(factorial(n)) | |
def greatest(x,y,z): | |
if (x>y)and(x>z): | |
print(x,"is greatest") | |
elif (y>x)and (y>z): | |
print(y,"is greatest") | |
else: | |
print(z,"is greatest") | |
def addtwo(x,y): | |
return x+y | |
def subtracttwo(x,y): | |
return x-y | |
def multiplytwo(x,y): | |
return x*y | |
def dividetwo(x,y): | |
return x/y | |
def square(x): | |
return (x*x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment