Functions 1
## 'write what wanna do' just after 'def'.
##then its expression
##then return that value.
##then either store that value in a variable and print it or just print.
##ex:-
def power(j,k):
z=j**k
return z
print(power(100,10))
## for addition.
def add(a,b):
z=a+b
return z
print(add(2,99))
"C:\Users\darul Haram\PycharmProjects\pythonProject2\venv\Scripts\python.exe" "C:/Users/darul Haram/PycharmProjects/pythonProject2/venv/Lib/Functions.py" 100000000000000000000 Process finished with exit code 0
Comments
Post a Comment