COMPUTER SCIENCE PYTHON AND C++
Tuesday, June 23, 2020
python Function with Return Statement
def add(a,b):
return(a+b)
def sub(a,b):
return(a-b)
def factorial(a):
f=1
for i in range(1,a+1):
f=f*i
return(f)
c=add(9,7)+sub(7,5)+factorial(7)+sub(9,5)+add(3,4)+len("india")
print(c)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment