function de in python code example
Example 1: how to define functions in python
def add(number):
equation = 5 + number
print(equation)
add(10)
output:
15
Example 2: functions in python
#Functions
#Functions are followed by the 'def' keyword
#Name your function
def myfunc():
a = 'This is a func'
#Calling the function
myfunc()
print(myfunc())