human
2.6 Functions

functions are declared with def statement
function is an object, like float, string, etc.

=====
Can you provide a the Python program you requested?
assistant
#Here is the Python program you requested.
def function_name():
    print ('Hello AML students')
    
function_name()

# Create a function that multiplies a number by 5 if it is above a given threshold, 
# otherwise square the input.
def manipulate_number(number, threshold):
    # Check whether the number is higher than the threshold.
    if number > threshold:
        return number * 5
    else:
        return number ** 2
    
print(manipulate_number(4, 6))
print(manipulate_number(8, 7))

def linear(x, k, b=0): # b=0 by defaults
    return k * x + b

print(linear(1, 3.0)) # we don't pass any keys of the arguements
print(linear(k=1, x=3.0)) # we pass the keys, sometimes to reorder arguements. 
print(linear(1, k=3.0, b=3.0)) # we pass b=3. and specify it because b=3.0 is not the default value

def are_close(a, b):
    return (a - b) ** 2 < 1e-6

# Functions could be passed as arguements
def evaluate(func, arg_1 ,arg_2):
    return func(arg_1, arg_2)

print(evaluate(are_close, 0.333, 1.0 / 3))