COMPUTER SCIENCE PYTHON AND C++
Tuesday, June 23, 2020
Python Function with example
def add(a,b):
print(a+b)
def sub(a,b):
print(a-b)
def factorial(a):
f=1
for i in range(1,a):
f=f*i
print(f)
x=add(5,4)
y=sub(9,8)
z=factorial(5)
print(x,y,z)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment